editing my styles...

User avatar
spaceace
Site Owner
Posts: 919
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

editing my styles...

Post by spaceace » Sat Feb 20, 2010 9:18 am

this post is about the conditional comments that are in my styles that need to stay in place while editing the files.

here's what the header menubar looks like in browsers greater than IE6
menubar.gif
this happens because of the conditional comment
Code: Select all
<!--[if gt IE 6]><!-->
menu code here
<!--<![endif]-->
translation = gt stands for "greater than"

now for how the style looks in IE6 or less
ie6menu.gif
this is accomplished by the comment
Code: Select all
<!--[if lte IE 6]>
navbar code here
<![endif]-->
translation = lte stands for "less than or equal"

personally, i do not like any Internet Explorer browser. they have very poor css support. MS has known this for a very long time has done pretty much nothing about it. style authors are forced to deal with this and i chose to not fix my menu to work in IE6, but instead have the basic prosilver navbar. if you want to see how my style looks with the drop down menu, upgrade your browser, or stop using IE as Firefox and other browsers are keeping up with time and not living in the past.
You do not have the required permissions to view the files attached to this post.
Last edited by spaceace on Tue Feb 26, 2013 10:29 am, edited 2 times in total.

if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Image

User avatar
yunderyo
Registered User
Posts: 3
Joined: Sat Feb 20, 2010 12:39 pm

Re: editing my styles...

Post by yunderyo » Sat Feb 20, 2010 12:47 pm

Thanks for the clarification. I have only dabbled a little with php and the question came up when I found the statements that were formatted <![endif]--> when what I (and notepad++) expected was <!--[endif]--> (see line 2 of viewforum_body.html as an example). Can you enlighten me as to what the difference is between the two and why you needed to use <![endif]--> rather than <!--[endif]-->?
Last edited by yunderyo on Tue Feb 26, 2013 10:29 am, edited 1 time in total.

User avatar
spaceace
Site Owner
Posts: 919
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: editing my styles...

Post by spaceace » Sat Feb 20, 2010 12:57 pm

ok, the viewforum_body.html has a link in it to the MCP, for IE6 will read the line in that file due to the conditional if statement
Code: Select all
<!--[if lte IE 6]><!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF --><![endif]-->
my drop down menu in the overall_header.html replaces this link in the "Control Panel" drop down that all browsers greater than IE6 can see.

so that if statement still has to remain in place.
Last edited by spaceace on Tue Feb 26, 2013 10:29 am, edited 1 time in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Image

User avatar
yunderyo
Registered User
Posts: 3
Joined: Sat Feb 20, 2010 12:39 pm

Re: editing my styles...

Post by yunderyo » Sat Feb 20, 2010 1:37 pm

No, I understand the if statement needs to be there and have always understood the if statement needs to be there. I do a fair amount of scripting in other languages, I just don't know php very well. I was hoping that with your understanding of php you could enlighten me regarding the usage.

Why does this line of code end with <![endif]--> instead of <!--[endif]-->
Code: Select all
<!--[if lte IE 6]><!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF --><![endif]-->


My limited knowledge of php says the <! point is always followed by -- and notepad++ marked it as a coding error so I assumed it was a typo. I am not saying you've done it wrong, I just wanted to understand php better. Why doesn't it start with this <!-- in this instance?
Last edited by yunderyo on Tue Feb 26, 2013 10:29 am, edited 1 time in total.

User avatar
spaceace
Site Owner
Posts: 919
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: editing my styles...

Post by spaceace » Sat Feb 20, 2010 2:10 pm

sorry, i misunderstood your question :oops:

that type of conditional statement targets IE browsers specifically and all other browsers ignore it. browsers like Firefox will act like it's not even there.

you can google conditional comments and you will find more info.
Last edited by spaceace on Tue Feb 26, 2013 10:29 am, edited 1 time in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Image

User avatar
yunderyo
Registered User
Posts: 3
Joined: Sat Feb 20, 2010 12:39 pm

Re: editing my styles...

Post by yunderyo » Sat Feb 20, 2010 6:19 pm

Gotcha, thanks. I'll read up more as I find myself doing a little more stuff with php lately.
Last edited by yunderyo on Tue Feb 26, 2013 10:29 am, edited 1 time in total.

User avatar
Ganapoes
Registered User
Posts: 4
Joined: Tue Nov 22, 2011 9:14 pm

Re: editing my styles...

Post by Ganapoes » Tue Nov 22, 2011 9:21 pm

you can google conditional comments and you will find more info.
Last edited by Ganapoes on Tue Feb 26, 2013 10:29 am, edited 1 time in total.

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests