View Full Version : CSS: Conditional Comments for IE
hkl
June 23rd, 2006, 09:36 AM
how do i do it in the style sheet?
i know how to do it in the html file but not in the css file. I'd rather not use 2 stylesheets:(
ari~
hkl
June 23rd, 2006, 09:42 AM
an idea like
background: url(images/bgbody.gif) repeat-x;
/* if IE background: url(images/iebgbody.gif) repeat-x; */
ari~
hkl
June 23rd, 2006, 11:49 AM
no matter, worked around it
senocular
June 23rd, 2006, 11:52 AM
they're html comments, not CSS comments. essentially they would be used around a link or style element but there are other css-based hacks to help you get around browser versions.
Jeff Wheeler
June 23rd, 2006, 11:57 AM
This works for IE before 7:
* html #id { stuff: stuff; }
Although avoiding this, as you did, is better.
senocular
June 23rd, 2006, 12:07 PM
This works for IE before 7:
* html #id { stuff: stuff; }
Although avoiding this, as you did, is better.
So 7 got rid of that hidden element? Guess that makes sense... haven't heard many good things about 7 so far - still not brave enough to try it :+)
Jeff Wheeler
June 23rd, 2006, 12:12 PM
Hehe, I think so.
hkl
June 23rd, 2006, 12:31 PM
I have a sort of 2 tone thing going on. I was using the bg-image repeat x to align with the top part of the 2 tone. But because of the sizing with IE and FF it didnt line up in 1 or the other. So i split 1 container into 2 and binning the bg image and changed the top containers bg to the correct colour. This helped in more ways than 1. It allowed it to align in both browsers; and it could expand if further text was added. and also add a bg colour to the bottom container also sticking to the 2 tone effect.
the css coding is terrible but it works....... sort of hehe
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.