#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    9
    Rep Power
    0

    Linking style sheets - formatting question


    Lets say I have sheets 1, 2 and 3 linked to main.css.
    Should I declare #container in sheet1.css, main.css or each css doc?
    Thanks,
    Jeremy
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    That depends on why you have three sheets linked to main.css.

    For example, if one of the sheets is called container.css and contains stylesheet rules for containers, then it makes sense to define it there. If one of the sheets is called colors.css and another is called borders.css, and #container has both a color and a border, then it makes sense to declare it in both.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    9
    Rep Power
    0
    Thanks for the quick response E-Oreo. From what you say, I think I might not understand the concept of container correctly. Could you please define #container for me? And is #container and #wrapper the same thing?
    Thanks,
    Jeremy
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    There is really no concept behind a container. #container is just an identifier. I could name it #a83482849 and it would function exactly the same. You name your identifiers whatever is logical for your markup, all identifiers are equal and the same.

    By definition a container is something that is capable of holding something else, so most HTML tags fit that definition pretty well. A wrapper has nearly the same definition. There is no convention or standard as to what identifier names you use, but the more descriptive the name is the better.

    When I think of a container element I normally think of something that doesn't "know" what's going to be rendered inside of it. That may not make sense, but it doesn't really matter because it's just my personal preference and I make it up as I go.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    9
    Rep Power
    0
    Thanks again. I was under the impression that it is madatory to have a first element called #container or #wrapper in the css code for all the website. A 'meta-div' that would contain all the other divs. After watching and reading a few more tutorials, Im begiining to understand that a #wrapper used as a 'meta-div' can help make the sections inside of it fit properly and look good on the website, but it's not required.

    Lots to learn with css and sometimes it's hard to sort the wheat from the chaff (the good turorials from the bad)!!!!

    Thanks again,
    Jeremy

IMN logo majestic logo threadwatch logo seochat tools logo