treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] #page-wrap and this site

  • This site as everyone knows is a great source for designing websites. As a very green designer I check the CSS & HTML of this site to try to understand how it works so well on a regular basis.

    In regards to this site (any page), Chris uses the following HTML:
    <div id="page-wrap">
    When I check the pages CSS I can't seem to locate a reference to:
    #page-wrap
    Am I missing something?
  • Not necessarily.

    It's fine to name the div just in case but if you don't actually target it to apply a class then there is no need to create rule.

    The added 'weight' is minimal but it makes inspecting and understanding the code much easier.
  • Above is true, alternatively it might be that he uses Javascript on the pagewrap so needs to name the div.

    As Paulie said though, it's not necessary to actually style each DIV and it's always helpful to name everything anyway just for semantics and readability.
  • not only do I name my divs, but I also feed them and take pictures as they grow. One day they might have a child div of thier own. -=op
  • Thanks for the responses.

    Schmotty.... you need to get outside and enjoy the sun a bit more ;)