In light of the answers to the original question that I had, I made corrections to my code. I was hoping if someone would tell me if this is the best approach in comparison. My original post and code is below.
UPDATED CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="author" content= "" /> <title>Example</title> <base href="" /> <link rel="stylesheet" type="text/css" href="" /> <style type="text/css"> * { margin: 0; padding: 0; } #wrapper { } #header { background-image: url('images/bg-inner-page.gif'); height: 200px; } #logo { float: left; margin-top: 50px; margin-left: 100px; } #topnav { float: right; margin-top: 50px; margin-right: 1250px; } #topnav ul { word-spacing: 10px; } #topnav ul li { list-style-type: none; display: inline; } #content { background-color: orange; } #footer { background-color: blue; } </style> </head> <body> <div id="wrapper"> <div id="header"> <div id="logo"> logo </div> <div id="topnav"> <ul> <li>home</li> <li>about</li> <li>browse</li> <li>faq</li> <li>contact</li> </ul> </div> </div> <div id="content">content</div> <div id="footer">footer</div> </div> </body> </html>
ORIGINAL MAIL
I am new to the world of coding as well as CSS. I am trying to line up CSS elements, but I don’t know how I can place any lines to get exact line height, position, etc. I tried using FireBug, but to no avail. Is there any tool I can use that can put a grid on top of the canvas?
EDIT
Here is an example of the code I'm working with.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="author" content= "" /> <title>Example</title> <base href="" /> <link rel="stylesheet" type="text/css" href="" /> <style type="text/css"> body { margin: 0; padding: 0; } #wrapper { } #header { background-image: url('images/bg-inner-page.gif'); height: 200px; } #logo { width: 20px; position: relative; top: 50px; left: 100px; } #topnav { width: 500px; position: relative; top: 14px; left: 150px; } #topnav ul { word-spacing: 10px; } #topnav ul li { list-style-type: none; display: inline; word-spacing: 10px; } #content { background-color: orange; } #footer { background-color: blue; } </style> </head> <body> <div id="wrapper"> <div id="header"> <div id="logo"> logo </div> <div id="topnav"> <ul> <li>home</li> <li>about</li> <li>browse</li> <li>faq</li> <li>contact</li> </ul> </div> </div> <div id="content">content</div> <div id="footer">footer</div> </div> </body> </html>
source share