www.webdeveloper.com
Results 1 to 4 of 4

Thread: Avoiding massive stylesheets / div soup

  1. #1
    Join Date
    Apr 2006
    Location
    Orange County, California
    Posts
    177

    Avoiding massive stylesheets / div soup

    Ive been giving myself a crash course in CSS, and ive almost got the hang of it, but now that im porting my design to the rest of the pages on the site i see i have a small problem.

    For example: http://www.nevertap.com/float is the way i want it styled.

    However on this page: http://www.nevertap.com/float/rules.php i would want the divs in the center and on the right to have a text-align: left.

    how do I avoid creating yet more divs for this different content? Do I create a separate stylesheet for this page? If so im in trouble because ive used includes for my header.
    In Somnis Veritas
    In Dreams There Is Truth

  2. #2
    Join Date
    Apr 2006
    Posts
    370
    Don't think these styling changes are significant enough for you to want to include additional stylesheets.

    If you're keen to avoid "soup," you might want to look at combining classes. So you might have

    <div class="maincontent">

    on one page, and you might add to it on another:

    <div class="maincontent textcontent">

    In the simplest case, maincontent would do the bulk of the styling, and textcontent would left align the text.

    Hope I'm making some sense here... !!!

  3. #3
    Join Date
    Apr 2006
    Location
    Orange County, California
    Posts
    177
    Actually, that makes perfect sense. That helped me work that issue out. I was unaware that I could do that.
    In Somnis Veritas
    In Dreams There Is Truth

  4. #4
    Join Date
    Apr 2006
    Posts
    370
    Glad I could be of help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles