SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Location
    Florida
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing the look of the main content on some pages

    I'm designing a site and want to change up the main content on some of pages. Do I do this with separate style sheets for each of those pages for the areas I'm changing.

    It will just be for the main content. The header, nav and footer will all be the same on every page.

    Thanks
    DB

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Put a different ID or class on an element that surrounds the content on those pages. Then you can edit only your single stylesheet to alter those pages.

    Ex, on page 1, surround the content with <div id="page1">, on page 2 <div id="page2">

    Then in your stylesheet:

    Code:
    #page1 {
      color: red;
    }
    
    #page2 {
      color: blue;
    }

  3. #3
    SitePoint Member
    Join Date
    Jan 2009
    Location
    Florida
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I didn't realize it was so easy. I should have asked that question a long time ago


Bookmarks

Posting Permissions

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