In advlayout.html, insert a clear below the
topnav area, then these paragraphs:
Welcome to Tech Tool, the magazine for people who like gadgets.
Every day, we cover the latest in electronic gadgetry.
Below the paragraphs, insert a footer area:
Every day, we cover the latest in electronic gadgetry.
- TIP: is an invisible character. It can be used as a placeholder or spacer in Web pages.
- In layout.css, add formatting for the footer area:
- #footer {
- background: #000099;
- margin: 0;
- padding: 10px;
- }
- Reload advlayout.html in the browser.
- It should look like this:
- body {
- margin: 0;
- text-align: center;
- }
- Set content width
- In advlayout.html, surround the paragraphs in an area for the page's main content:
Welcome to Tech Tool, the magazine for people who like gadgets.
Every day, we cover the latest in electronic gadgetry.
- In layout.css, add formatting for the maincontent area:
- #maincontent {
- margin: 0;
- padding: 20px;
- }
- In advlayout.html, enclose everything between the tags in the pagewidth area:
- ...
- In layout.css, add formatting for the pagewidth area:
- #pagewidth {
- text-align: left;
- width: 700px;
- border-style: solid;
- border-color: #000000;
- border-width: 1px;
- }
- body {
- margin: 40px 0;
- text-align: center;
- }
- TIP: You can use shorthand when setting measurements for margin, padding, borders and other elements: if you only include two measurements, the browser reads the first one as top/bottom:
- margin: 20px 0;
- and the second one as left/right:
- margin: 20px 0;