Daniel T
01-08-2004, 08:14 PM
hey, im workin on a new site design and im having some problems. i have attatched a screen-shot of what my site looks like now(scaled down to 50% because of large file size). as you can see in the screen shot, there are gaps between the list items that make up the nav bar. because of this, wen i enter "width:20%;" in the "#nav ul li" css area, it takes up 2 lines instead. here is my code:
the css:
h1{
color:#ddf;
font-family:arial;
font-size:35px;
}
body {
font-family:arial;
color:#666;
margin:0;
padding:0;
background-color:efefff;
}
a,a:link,a:visited {
color:#369;
text-decoration:underline;
}
a:hover {
color:09F;
text-decoration:none;
}
#page {
width:750;
font-size:17px;
font-family:arial;
text-align:left;
border: 1px solid #999999;
border-top-width:0px;
background-color:#ffffff;
margin:0;
padding:0;
}
#logo {
height:100px;
width:100%;
font-size:17px;
font-family:arial;
text-align:center;
background:url("images/logo.jpg") #dddddd;
padding:0;
margin:0;
}
#pgContent {
width:100%;
height:100%;
font-size:17px;
font-family:arial;
text-align:left;
background-color:#fff;
margin:0;
padding:10px;
}
#copyRight {
border: 1px solid #999999;
width:100%;
color:#000;
font-size:13px;
font-family:arial;
text-align:right;
background-color:#ddf;
margin:15px;
padding:5px;
}
#copyRight a {
color:#369;
text-decoration:none;
}
#copyRight a:hover {
color:#09f;
}
#copyRight a:active {
color:#369;
}
#nav {
font-size:17px;
font-family:arial;
width:100%;
text-align:center;
background:url(images/file.jpg) #fff repeat;
margin:0;
padding:0;
}
#nav ul {
list-style-type:none;
margin:0;
padding:0;
}
#nav ul li {
display:inline;
padding:0;
margin:0;
}
#nav ul li a {
background:url(images/file.jpg) #eef repeat;
color:#000;
text-decoration:none;
width:20%;
}
#nav ul li a:hover {
color:#039;
background-color:#FFF;
}
and the html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Welcome!</title>
<style type="text/css">
@import url("styles.css");
</style>
</head>
<body leftmargin=0 topmargin=0>
<center>
<div id="page">
<div id="logo"></div>
<div id="nav">
<ul>
<li><a href="index.html" target="">Menu Item 1</a></li>
<li><a href="html.html" target="">Menu Item 2</a></li>
<li><a href="javascript.html" target="">Menu Item 3</a></li>
<li><a href="css.html" target="">Menu Item 4</a></li>
<li><a href="tutorials.html" target="">Menu Item 5</a></li>
</ul>
</div>
<div id="pgContent">
<p>
PAGE CONTENT GOES HERE
</p>
</div>
</div>
<div id="copyRight">COPYRIGHT INFORMATION GOES HERE</div>
</body>
</html>
i would like a reply asap on this. thanx!
-Dan
the css:
h1{
color:#ddf;
font-family:arial;
font-size:35px;
}
body {
font-family:arial;
color:#666;
margin:0;
padding:0;
background-color:efefff;
}
a,a:link,a:visited {
color:#369;
text-decoration:underline;
}
a:hover {
color:09F;
text-decoration:none;
}
#page {
width:750;
font-size:17px;
font-family:arial;
text-align:left;
border: 1px solid #999999;
border-top-width:0px;
background-color:#ffffff;
margin:0;
padding:0;
}
#logo {
height:100px;
width:100%;
font-size:17px;
font-family:arial;
text-align:center;
background:url("images/logo.jpg") #dddddd;
padding:0;
margin:0;
}
#pgContent {
width:100%;
height:100%;
font-size:17px;
font-family:arial;
text-align:left;
background-color:#fff;
margin:0;
padding:10px;
}
#copyRight {
border: 1px solid #999999;
width:100%;
color:#000;
font-size:13px;
font-family:arial;
text-align:right;
background-color:#ddf;
margin:15px;
padding:5px;
}
#copyRight a {
color:#369;
text-decoration:none;
}
#copyRight a:hover {
color:#09f;
}
#copyRight a:active {
color:#369;
}
#nav {
font-size:17px;
font-family:arial;
width:100%;
text-align:center;
background:url(images/file.jpg) #fff repeat;
margin:0;
padding:0;
}
#nav ul {
list-style-type:none;
margin:0;
padding:0;
}
#nav ul li {
display:inline;
padding:0;
margin:0;
}
#nav ul li a {
background:url(images/file.jpg) #eef repeat;
color:#000;
text-decoration:none;
width:20%;
}
#nav ul li a:hover {
color:#039;
background-color:#FFF;
}
and the html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Welcome!</title>
<style type="text/css">
@import url("styles.css");
</style>
</head>
<body leftmargin=0 topmargin=0>
<center>
<div id="page">
<div id="logo"></div>
<div id="nav">
<ul>
<li><a href="index.html" target="">Menu Item 1</a></li>
<li><a href="html.html" target="">Menu Item 2</a></li>
<li><a href="javascript.html" target="">Menu Item 3</a></li>
<li><a href="css.html" target="">Menu Item 4</a></li>
<li><a href="tutorials.html" target="">Menu Item 5</a></li>
</ul>
</div>
<div id="pgContent">
<p>
PAGE CONTENT GOES HERE
</p>
</div>
</div>
<div id="copyRight">COPYRIGHT INFORMATION GOES HERE</div>
</body>
</html>
i would like a reply asap on this. thanx!
-Dan