Ok, I have a page that I am writing and I'm trying to use CSS instead of using Tables for my layout. I am having a hard time when it comes to arranging and grouping my CSS DIVs. I just don't quite understand what I am supposed to group together and what I am not. Here is my test page
This is the page as it is supposed to look. It should look the same in all browsers, I am guessing, because I use absolute positioning for everything.
http://www.gtoro.com/test/TestBordersOff.html
Here is the same page with borders turned on so you can see what I have grouped and where it is.
http://www.gtoro.com/test/TestBordersOn.html
Here is the code from the first page in case you cannot see it yourself
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD><TITLE>gtoro</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="gtoro.css"> <style type="text/css"> <!-- body { background-color: #FFFFFF; color: #666666; font-family: helvetica, arial, georgia, courier; font-size: 11px; } input, select { font-size:11px; } #BoxBorder { position: absolute; margin-left: -288px; margin-top: -144px; top: 50%; left: 50%; width: 576px; height: 288px; border : 1px solid black; overflow: hidden; } #TitleBar { position: absolute; background-color: #FF9900; color: #FFFFFF; left: 0px; top: 0px; width: 574px; height: 20px; padding: 5px 10px 5px 10px; overflow:hidden; } #TitleBar div a { color: #000000; text-decoration: none; } #TitleBar div a:hover { color: #FFFFFF; } #FormHeading { position: absolute; color: #000000; left: 20px; top: 30px; width: 310px; height: 20px; font-weight: bold; font-size: 12px; overflow:hidden; border : 1px solid black; } #FormLeftTitles { position: absolute; left: 20px; top: 50px; width: 55px; height: 90px; line-height: 21px; overflow:hidden; border : 1px solid black; } #FormLeftInputs { position: absolute; left: 80px; top: 50px; width: 200px; height: 90px; overflow:hidden; border : 1px solid black; } #FormRight1 { position: absolute; left: 300px; top: 50px; width: 180px; height: 90px; overflow:hidden; border : 1px solid black; } #FormRight2 { position: absolute; left: 390px; top: 65px; width: 80px; height: 65px; overflow:hidden; border : 1px solid black; } #FormComments { position: absolute; left: 20px; top: 170px; width: 410px; height: 110px; overflow:hidden; border : 1px solid black; } #FormSubmit { position: absolute; left: 500px; top: 255px; width: 55px; height: 25px; overflow:hidden; border : 1px solid black; } --> </style> </HEAD> <BODY> <div id="BoxBorder"> <div id="TitleBar"> <div style="float:left;"><a href="mailto:x@x.com">smith dave</a></div> <div style="float:right;"><a href="mailto:x@x.com">dave smith</a></div> </div> <div id="FormHeading">For more information, please fill out the form below.</div> <form name="ContactForm" action="/Contact.php"> <div id="FormLeftTitles"> Name :<br> Company :<br> Phone :<br> Website :<br> </div> <div id="FormLeftInputs"> <input type="text" size="30" name="Name"><br> <input type="text" size="30" name="Company"><br> <input type="text" size="30" name="Phone"><br> <input type="text" size="30" name="Website"><br> </div> <div id="FormRight1"> I would like more information on<br> <input type="checkbox" name="Print"> Print<br> <input type="checkbox" name="DirectMail"> Direct Mail<br> <input type="checkbox" name="Collateral"> Collateral </div> <div id="FormRight2"> <input type="checkbox" name="Packaging"> Packaging<br> <input type="checkbox" name="Logos"> Logos<br> <input type="checkbox" name="Websites"> Websites </div> <div id="FormComments"> Other Comments<BR> <textarea name="Comments" ROWS=5 COLS=47></textarea> </div> <div id="FormSubmit"> <input type=submit value="Submit"> </div> </form> </div> </BODY> </HTML>
So does any experienced CSS developer have any suggestions on what I am doing right and wrong with using CSS for my layout?
Thanks in advance for any suggestions










Bookmarks