margin spacing problem
Hallo,
I using the following code from css play. this display a menu.
.preload16 {background: url(m_admin/m_admin_2.gif);}
.preload16a {background: url(m_admin/m_admin_2a.gif);}
.m_admin {padding:0 0em 0 1em; margin:0; list-style:none; height:43px; position:relative;
background:transparent url(../images/menu2/m_admin_back.gif) repeat-x left top ; font-size:11px;width:650px}
.m_admin li {float:left; height:43px;}
.m_admin li a {display:block; float:left; height:40px; line-height:35px; color:#888; text-decoration:none;
font-family:arial, verdana, sans-serif; font-weight:bold; text-align:cente开发者_JS百科r; padding:0 0 0 10px;
cursor:pointer; background:url(../images/menu2/m_admin_0a.gif) no-repeat;margin-top:0em;}
.m_admin li a b {float:left; display:block; padding:0 60px 0 0; background:url(../images/menu2/m_admin_0.gif)
no-repeat right top;margin-top:0em;}
.m_admin li.current a {color:#000; background:url(../images/menu2/m_admin_2a.gif) no-repeat;}
.m_admin li.current a b {color:#000; background:url(../images/menu2/m_admin_2.gif) no-repeat right top;}
.m_admin li a:hover {color:#000; background: url(../images/menu2/m_admin_2a.gif) no-repeat;}
.m_admin li a:hover b {color:#000; background:url(../images/menu2/m_admin_2.gif) no-repeat right top;}
.m_admin li.current a:hover {color:#000; cursor:default;}
I want that menu in a table row... so used the following code..
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>123</td></tr>
<tr>
<td>
<ul class="m_admin">
<li class="current"><a href="#nogo"><b>Double ones</b></a></li>
<li><a href="#nogo"><b>Edit page</b></a></li>
<li><a href="#nogo"><b>Search</b></a></li>
</ul>
</td>
</tr>
<tr><td>123</td></tr>
</table>
Now in the middle row, besides the menu that is getting displyed..there is a some space left..there is some bottom margin..i need the menu should exactly FIT in the row..i have no idea, how to adjust that with margin..please help me...
Are you looking at something like this - http://www.jsfiddle.net/DPjnL/
If so, I have just removed all the height and line-height attributes from your css. You can find the html/css code attached right there in the link
精彩评论