<< .. Go to : : Schedule : : Exercise 7 : : Demo 7A : : Demo 7B : : Demo 7C : : Demo 7D : : Demo 7E : : Demo 7F : : All Class Demos .. >>

Exercise 7 Demo: Part C : Simple CSS Page Layout - Add CSS Styles

Left Column

<body>
<div id="wrapper">
<div id="banner">
<h1>Banner Area</h1>
</div>

<nav>Navigation</nav>

<div id="lftcol"
><h2>Left Column</h2>
</div>

<div id="mainSection">
<h2>Main Content Section</h2>
</div>

<footer>< <h3>Footer</h3>
</footer>

</div>
</body>
</html>

Main Content Section

This simple layout [Demo 7A] started with this basic html coding and then added CSS style to have the pieces fall into place. Figure out your design first (do a sketch), do the basic coding and then add your CSS styles.

<!DOCTYPE html>
<html>
<head>
<title>Page Layout</title>
<style type="text/css">
#wrapper {width: 950px; background-color: #e4ecec; margin: 15px auto;
border: 1px solid black; text-align:left; padding: 5px;}

#banner {border-bottom: 2px solid #2f8ae0; }

nav {height: 25px;border-bottom: 2px solid #2f8ae0; padding-top: 10px;}

#lftcol {width: 235px; height: 450px; float: left; border-right: 2px solid #2f8ae0;}

#mainSection {width: 700px; float: right; }

footer {clear: both; border-top:2px solid #2f8ae0; }
</style>
</head>