I'm quite a beginner to CSS and HTML as I'm trying to learn while making a webpage on Weebly
Anyways, I see a container
div class after almost every div id. I was looking through the CSS and only saw a margin and width property for the div class by itself, but saw the container
class as a child element after all id selectors. I was wondering what the container
class actually does and why it is needed.
Example:
.container {
margin: 0 auto;
width: 960px;
}
#nav-wrap {
background: url(nav-bg.jpg);
box-shadow:0 1px 2px 1px rgba(0,0,0,0.25);
position:relative;
z-index:3;
}
#nav-wrap .container {
clear: both;
overflow: hidden;
position: relative;
width: 960px;
box-shadow:none;
}
In the example above, which area does #nav-wrap
indicate and which area does #nav.wrap .container
indicate?
Thanks!