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

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

Left Column

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

<div id="nav"> Navigation

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

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

<div id="footer">


Main Content Section

This simple layout [Demo 8A] 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 styles.

<!DOCTYPE html>
<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; }