View Full Version : Html Comments to specify browser


Idiotic Creation
10-31-2006, 01:12 AM
Hey, I have noticed that browsers interpret colors a little bit differently. And I know there is a way to use HTML comments to specify which browsers will see what code, but I cant find it anywhere.

Also I need a little bit more information about this color error between browsers. Is it just in IE and all other browsers are the same?

Thanks, David

mcg1sean
11-01-2006, 02:23 AM
I think I know what you're talking about...but I think its in CSS and is an "if" statement....the only example that might help is if you look at the source for this page that I helped make. (http://www.clanioc.com/) at the top of the code its got an if statement that detects if the browser is IE and if so, it uses a special stylesheet that works with IE. but unfortunately thats all that I know because it was my friend that figured out how to do it...I'll see if I can check with him to see if he remembers what it is and how it works.

<edit>
heres what I found....what you need is a conditional statement. basically, if youre using css, its really easy to make one color work for IE and one for all other browsers. the link below is to a tutorial that should help
http://virtuelvis.com/archives/2004/02/css-ie-only

Idiotic Creation
11-01-2006, 11:27 PM
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie.css" />
<![endif]-->

Thats what I was thinking of!

I did'nt think that was a css conditional though, since it is in an html comment.

Thanks,
David