homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

External Style Sheets

Msg#: 4284681 posted 6:06 pm on Mar 20, 2011 (gmt 0)

Hi! I'm looking for 'best practices' advice concerning external style sheets.
When developing a webpage, I first keep my styles internally within the page HTML. Then I try to move most of the styles to an external style sheet(s). However, after moving the styles to the external sheet, priority conflicts occur affecting the webpage layout and I spend no end of time trying to debug the conflicts. After awhile, I give up and just move the styles back into the HTML file for the page, which defeats the purpose of the external sheet. It makes no sense to write code this way.
What is the 'best practices' way to proceed with the placement of CSS styles?
Appreciate any advice.



5+ Year Member

Msg#: 4284681 posted 6:27 pm on Mar 20, 2011 (gmt 0)

Creating the site with an external stylesheet from the start would be best.

This way, all the styles are in one spot for easier maintenance but it also makes it easier to troubleshoot.

Styles are applied in the order the browser finds them. If you have something in the internal stylesheet or an inline style those will override the external stylesheet.

With an external stylesheet you also have to be careful what order you add styles but it is easier to rearrange the styles in the external stylesheet or make them container specific by applying them to a specific div id.


Msg#: 4284681 posted 9:46 pm on Mar 22, 2011 (gmt 0)

Thanks for the advice................looks like I've got work to do!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved