I'm just wondering if I'm doing this correctly. You know those content boxes on
www.yahoo.com 's Weather/In The News/Marketplace. It has a header (with purple background) and the content area.
This is how i do it with CSS
CSS Code:
Code:
.header {
width: 100px;
background-color: purple;
padding: 5..pxem;
margin: 0;
}
.content {
width: 100px;
padding: 5px;
border: 1px solid purple;
}
HTML CODE:
Code:
<body>
<div class="header">In Th News</div>
<div class="content">Content flows here</div>
</body>
It seems annoying to insert both the header and content div's everytime you want a new content box. Is there an easier way?