Andy Borka wrote: > How many stylesheets can be linked to a single page at a time?
IE/win can handle up to 31 stylesheet links / @imports. Other browsers can handle at least a few thousand. Proof: <http://www.gunlaug.no/contents/wd_chaos_27.html> <http://www.gunlaug.no/contents/wd_chaos_28.html> > I need to know because I want to make different stylesheets for each > major feature for the site. That way I don't have to sort and page > through a 300+ line stylesheet to find the things I need out of it. > So for an example I would have stylesheets like: News.css, > Events.css, MasterStyle.css, IE6Style.css, Band.css and on, and on, > and on. If well organized your approach may work fine. Too many stylesheets and/or too many styles targeting the same elements, won't help much on maintenance and debugging though. I use multi-stylesheets on sites where some groups of styles are common (across the entire site), some are exclusive for site-sections, and some carry IE fixes. The idea is to not having to repeat common styles in several site-section stylesheets - where common styles may not be updated in sync, and not have too target too many individual body-IDs with long selector-chains. I usually @import all common styles into the main stylesheet for each site-section/site-group. This means the top of a section-stylesheet may look like this... /* styles for site-group-name */ @import url("linkstyles.css"); @import url("printstyles.css"); @import url("commonstyles.css"); @import url("morecommonstyles.css"); @import url(fix-IE) all; @import url(mobile.css) screen and (max-device-width: 560px); /*\*//*/ @import u\rl("fix-macie.css"); /**/ /* the page */ ..... The stylesheet links in the page will then only have one or two stylesheet links, like... <link rel="stylesheet" href="styles/site-group-name.css" type="text/css" /> <link rel="stylesheet" href="styles/mobile.css" type="text/css" media="handheld" /> The restriction of "not more than 31 links/@imports in IE/win" for the total, still goes no matter how/where stylesheets are added in. regards Georg -- http://www.gunlaug.no ______________________________________________________________________ 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/
