| Author |
Message |
blcArmadillo Samurai++
Joined: 04 Mar 2005 Posts: 85 Location: Michigan
|
Posted: Wed Mar 28, 2007 7:50 pm Post subject: Problem with lists. |
|
|
I'm using lists right now to create a navagation menu. Everything seems to be working fine, however, I can't get rid of some space between the "buttons" which are images.
Here is an image of the problem:
Here is my CSS code for the nav:
| Code: | /* Layout---------------------------------------- */
...
#navpholder {
float:left;
width:152px;
}
...
/* Nav---------------------------------------- */
#nav, #nav ul {
list-style:none;
padding:0px;
margin:0px;
}
#nav li ul {
display:none;
}
#nav li:hover ul {
display:block;
} |
Here is my HTML for the nav:
| Code: | ...
<div> // should have an id attribute called navpholder, but the the forum seems to be editting it out.
<ul> // should have an id attribute called nav, but the forum seems to be editting it out.
<li><img src="images/navparent.gif"></li>
<li><img src="images/navparent.gif">
<ul>
<li><img src="images/navchildf.gif"></li>
<li><img src="images/navchild.gif"></li>
</ul>
</li>
<li><img src="images/navparent.gif"></li>
</ul>
</div>
... |
Does anyone have any suggestions of how I can eliminate this white space? If you have any questions regarding my question please ask. Thanks. -Ian |
|
| Back to top |
|
 |
Ankou Spam Mod
Joined: 22 Oct 2004 Posts: 1201 Location: Wisconsin
|
Posted: Thu Mar 29, 2007 7:28 am Post subject: |
|
|
Set margin and padding to 0 for both ul and li....
ul{ margin: 0; padding: 0; }
li{ margin: 0; padding: 0; }
If you need some padding on a particular list/list item then add it using the id.
Also you set #nav ul with margin and padding to be 0 but your ul tag doesn't use the id "nav". Make sure that you watch out for things like that.  |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2002 phpBB Group
|