Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Center text in nav bar


birdbrain - 7:03 am on Jul 27, 2012 (gmt 0)


Hi there bsbrilliantmojo,

and a warm welcome to these forums. ;)

Try it like this...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>untitled document</title>

<style type="text/css">
body {
overflow-y:scroll;
background-color:#f0f0f0;
}
#nav {
width:1100px;
border:1px solid #0c00ff;
padding:0;
margin:0 auto;
list-style:none;
text-align:center;
overflow:hidden;
background-color:#fff;
}
#nav li {
float:left;
width:275px;
}
#nav li a {
display:block;
border:1px solid #0c00ff;
padding:8px 0;
margin:2px;
background-color:#ccf;
font-size:18px;
font-weight:bold;
color:#000;
text-decoration:none;
}
#nav li a:hover {
color:#0c00ff;
}
</style>

</head>
<body>

<ul id="nav">
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
</ul>

</body>
</html>


birdbrain


Thread source:: http://www.webmasterworld.com/css/4479180.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com