Michael Adams wrote

> I have been lurking here for the last month and have a question about
> the right way to handle IE using CSS.
> 
> I use a master CSS file with the format as follows. To me, the master
> file method as well as solving the 'old browser' issue, is easier for
> another designer to approach my code.
> 
> /* Master CSS File */
> @import url(layout.css);
> @import url(colour.css);
> @import url(fonts.css);
> @import url(.css) all; 
> /* 
> For the final import line above
> IE and AOL9/Win load a file called "url(.css) all" 
> All other browsers load ".css"
> */
> 
> Is the above IE hack considered the best CSS solution for this method
> of loading CSS? Are there others?
> 
> -- 
> Michael

I would say that there is no universally agreed best method of feeding IE 
alternative styles. The general consensus is not to hack unless you really need 
to. The method that you have shown is actually the IE @import hack [1] and not 
the propriety IE Conditional Comments which are added to the html. There are 
many alternative CSS hacks for IE [2] some of which result in parsing errors 
(invalid hacks) and some of which that don't (valid hacks).

Doing some test [3] with @import hacks I find that they can be very simple, 
scary.

@import ie;

or by directory and file.

@import ../ie/ie;

or

@import ..\ie\ie;

All three can be used to target IE/Win. The use of these hacks are not 
recommended unless you know the full consequences.


1. <http://www.gunlaug.no/contents/wd_additions_12.html>
2. <http://www.webdevout.net/css-hacks/>
3. <http://css-class.com/test/css/selectors/ie/import-hacks.htm>


Alan

http://css-class.com/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to