Hello all,
I have a basic layout working for a site I am working on http://www.rlmorris.com/testsite/] and everything looks how I want it to in firefox and ie and passes css and html validation. I am very new to css and have a feeling I am using too many div's to create the layout I want. If anyone cares to take a look at my code and post any alternate css layout ideas that are simpler I would love to see them. Thanks so much in advance.
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <div id="page-container"> <div id="logo-top"> <img src="images/wvf-logo.jpg" alt="" /></div> <div id="top"> </div> <div id="header"> <img src="images/777x116.jpg" alt="" /> </div> <div id="menu"> <p> <a href="#">Get started</a> <a href="#">Member login</a> <a href="#">Vendor login</a> <a href="#">Contact us</a> </p> </div> <div id="middle"> <div id="left-nav-container"> <div id="left-nav-top"> <p> Choose State</p> </div> <div id="left-nav-middle"> <ul> <li><a href="#">Arkansas</a></li> </ul> </div> <div id="left-nav-bottom"> </div> </div> <div id="middle-nav-container"> <div id="middle-nav-top"> <p> Featured National Vendors</p> </div> <div id="middle-nav-middle"> <div id="middle-nav-middle-content"> <img src="images/417x117.jpg" alt="" /> </div> </div> <div id="middle-nav-bottom"> </div> </div> <div id="right-nav-container"> <div id="right-nav-top"> <p> Other Sites</p> </div> <div id="right-nav-middle"> <div id="right-nav-middle-content"> <img src="images/117x117.jpg" alt="" /> </div> </div> <div id="right-nav-bottom"> </div> </div> </div> <div id="copyright"> <p> WeddingVendorFinder.com</p> </div> <div id="bottom"> </div> </div> /* General CSS page properties */ html, body { margin: 0; padding: 0; text-align: center; } div { width: 836px; border: 0px solid; } a { color: #9cb7df; text-decoration: none; } p, h1, h2, h3, h4 { font: .8em "Century Gothic" , Verdana, serif; color: #a8a8a8; } h1 { font-size: 1.5em; } h2 { font-size: 1.2em; } h3 { font-size: 1em; } h4 { font-size: .8em; } ul { margin-top: 0; font-family: "Century Gothic" , Verdana, serif; color: #9cb7df; font-weight: 500; font-size: 13px; } /* Main container div */ #page-container { height: 100%; margin: 0 auto; text-align: left; } /* WVF text logo */ #logo-top { height: 50px; position: relative; top: 23px; left: 13px; } /* Top main div */ #top { background: url(images/bgtop836x28.jpg) top center no-repeat; height: 28px; } /* Header div that contains header image */ #header { height: 116px; background: url(images/bgmiddle836x104.jpg) center repeat-y; } #header img { margin-left: 26px; } /* Main menu div */ #menu { height: 44px; background: url(images/whiteheaderbar836x44.jpg) center; overflow: hidden; } #menu p { font-weight: 500; letter-spacing: 1px; text-align: center; margin-top: 10px; } #menu a { color: #a8a8a8; text-decoration: none; margin-right: 35px; } #menu a:hover { text-decoration: underline; } /* Middle main div */ #middle { background: url(images/bgmiddle836x104.jpg) center repeat-y; overflow: hidden; } /* Copyright div that contains copyright info */ #copyright { height: 44px; background: url(images/whiteheaderbar836x44.jpg) center; overflow: hidden; } #copyright p { font-weight: 500; font-size: 13px; letter-spacing: 1px; text-align: center; margin-top: 10px; } /* Bottom main div */ #bottom { background: url(images/bgbottom836x43.jpg) bottom center no-repeat; height: 43px; overflow: hidden; clear: both; } /* Main left container div */ #left-nav-container { float: left; width: 155px; margin-left: 28px; overflow: hidden; } #left-nav-container a:hover { text-decoration: underline; } /* Left nav top div */ #left-nav-top { background: url(images/smallcolum155x53.jpg) top center no-repeat; width: 155px; height: 53px; overflow: hidden; } #left-nav-top p { font-weight: 500; font-size: 15px; letter-spacing: 1px; text-align: center; margin-top: 16px; } /* Left nav middle div */ #left-nav-middle { background: url(images/smallcolummid155x53.jpg) center repeat-y; width: 155px; overflow: hidden; } /* Left nav bottom div */ #left-nav-bottom { background: url(images/smallcolumbottom155x53.jpg) bottom center no-repeat; width: 155px; height: 20px; overflow: hidden; } /* Main middle container div */ #middle-nav-container { width: 470px; float: left; } /* Middle nav top div */ #middle-nav-top { background: url(images/bigcolumtop470x53.jpg) top center no-repeat; width: 470px; height: 53px; overflow: hidden; } #middle-nav-top p { font-weight: 500; font-size: 15px; letter-spacing: 1px; text-align: center; margin-top: 16px; } /* Middle nav middle div */ #middle-nav-middle { background: url(images/bigcolummid470x53.jpg) center repeat-y; width: 470px; overflow: hidden; } #middle-nav-middle-content { margin-left: 16px; width: 433px; } #middle-nav-middle-content img { margin-bottom: 5px; margin-left: 7px; } #middle-nav-bottom { background: url(images/bigcolumbottom470x53.jpg) bottom center no-repeat; width: 470px; height: 20px; overflow: hidden; } /* Right nav container div */ #right-nav-container { float: left; width: 155px; } /* Right nav top div */ #right-nav-top { background: url(images/smallcolum155x53.jpg) top center no-repeat; width: 155px; height: 53px; overflow: hidden; } #right-nav-top p { font-weight: 500; font-size: 15px; letter-spacing: 1px; text-align: center; margin-top: 16px; } /* Right nav middle div */ #right-nav-middle { background: url(images/smallcolummid155x53.jpg) center repeat-y; width: 155px; overflow: hidden; } #right-nav-middle-content { margin-left: 10px; width: 129px; } #right-nav-middle-content img { margin-bottom: 5px; margin-left: 6px; } /* Right nav bottom div */ #right-nav-bottom { background: url(images/smallcolumbottom155x53.jpg) bottom center no-repeat; width: 155px; height: 20px; overflow: hidden; }







Each time you need a background image, or a boxy type shape you need an element to hang them on.

Bookmarks