SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Location
    ATL!
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    multiple CSS or just an inline?

    I have built a portfolio website and have set up the initial CSS. While this works well for the index page, I would like to change the content width (lose the side nav and contact me boxes) for the resume and sample work pages. Would I be better off setting up a second CSS with only the content width changed or just setting an inline style to do this? Right now, when you look at the pages with just the one style sheet the page has too much white space to the right side (obviously where the nav and contact areas are!) I am not sure whether posting the URL would help but...
    http://www.msanaktoday.com/
    if you want to see what I mean and can offer a solution to a noob issue!

    Thanks for helping me learn my way through

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Yo. Ok do this...

    On each page give the body tag a different id <body id="contact"> >> put all your css in the same external css and link to in the head of your doc >> in your css if you need different rules for different page you simply say #contact div {yada}. That's the best way. No need to ponder on it anymore

  3. #3
    SitePoint Member
    Join Date
    Nov 2012
    Location
    ATL!
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That makes sense. Thanks, I will do it!

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,535
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Yes I was just about to post the same as Eric

    e.g.
    Code:
    .fullwidth #content{
    float:none;
    width:auto;
    background-repeat: repeat-x;
    }
    Code:
    <body class="fullwidth">

  5. #5
    SitePoint Member
    Join Date
    Nov 2012
    Location
    ATL!
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do have to say that this method was so much easier than anything I thought of. I am really beginning to see the power of CSS the more I use it. Now I just need to really learn how to USE it.
    Thank you all for saving the day!! I might actually get this site looking half decent yet.


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
  •