Forum Moderators: not2easy
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
a {display:block;float:left;}
div, a {border:1px solid #000}
-->
</style>
</head><body>
<div><a href="#">One</a><a href="#">Two</a><a href="#">Three</a><a href="#">Four</a></div>
</body>
</html>
You may want to look into building your nav using a <ul>, and then floating the anchors that would reside in the <li>'s.
Check out this thread started by grahamstewart about Technique: creating navigation bars from lists of links [webmasterworld.com].
I'm now faced with a new problem. The div I created for the navigation bar has a black background with a blue border at the top and bottom. It spans the width of its container div. I want those anchors to be centered in that background. They seem to have minds of their own even though they are nested in the navbar div. I thought that the navbar div would grow in height to accommodate the links, but instead it doesn't even appear to know that the links exist. Any thoughts?
hope this helps