It makes sense to have all your CSS in one style sheet. I however always end up styling in my html as well. If I repeat a style a lot, I'll put in my external. Otherwise I code in my html as well. A little sloppy I know.
and you?
| SitePoint Sponsor |


It makes sense to have all your CSS in one style sheet. I however always end up styling in my html as well. If I repeat a style a lot, I'll put in my external. Otherwise I code in my html as well. A little sloppy I know.
and you?





I ALWAYS put all the styles in an external stylesheet - or several external style sheets - just keeps it simpler to maintain for me.
★ James Padolsey
–––––––––––––––––––––––––––––––––––––––
Awesome JavaScript Zoomer (demo here)
'Ajaxy' - Ajax integration solution (demo here)


I was thikning the same thing today...generally I always put all my styles in an external sheet, but what if the site you are making needs different styles for each page, rather than using a template...


Then it would make sense to put all of the CSS for Page X in Page X's external stylesheet, and to put all of the CSS for Page Y in Page Y's external stylesheet. While it means an additional HTTP request, it keeps file sizes down (it shouldn't be much of an issue anyway, unless you have users working on lower speed connections), and with any luck the visitor will cache the CSS file, meaning (hopefully) less bandwidth usage for everyone.
I use external stylesheets only, I find it alot easier to maintain a website using external stylesheets.


Mainly external style sheets, but on occasion I can add a style element in the head if there's only some minor thing that's needed for a single page only. I'll also do this to style forms, since there's no two of them that are exactly alike. I'll keep the main rules for fieldsets, labels, etc. in the external style sheet, of course, but things like input widths will vary between forms and I'll stick those in an internal style sheet.
Birnam wood is come to Dunsinane
External style sheets all the way, and generally only one for a site (except for those "iefixes" css files).


One external stylesheet per medium. And to make it even easier to determine which is which, I'll use the name for that stylesheet as well.
screen.css
print.css
and so on. And any "IE 5/6 fixes" just get put into a separate iefix.css (which does make heavy use of the * html selector hack) file which is imported into the screen.css file saving me the mess of having to deal with conditional comments.
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns






Stylesheets on the page are helpful changing things in includes. (Like bolding navigation for the page your on.) Other than that, alway external.


Actually eruna, just adding a class dynamically via a server-side program can take care of that. The external stylesheet could then contain the CSS for that class.![]()
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
Bookmarks