HTML and CSS Reference
In-Depth Information
Figure 8-24. The heading's top margin pushes the <div> away from the top of the page
To eliminate the gap, remove the top margin from the
<h1> element, and replace it
with padding. Amend its style rule like this:
h1 {
text-align: center;
margin-top: 0;
padding-top: 20px;
Add a white background color to the
7. main and aside <div> elements. Also give
them a top margin to move them away from the banner image behind the heading.
#main {
width: 65%;
margin-right: 35%;
background-color: #FFF;
margin-top: 15px;
#aside {
float: right;
width: 32%;
display: inline;
background-color: #FFF;
margin-top: 15px;
Search WWH ::

Custom Search