[英]Drop down menu css positioning/customizing
I am trying to make a drop down bar that looks like whats on http://www.ebay.com on the left where it has the categories. 我正在尝试制作一个下拉栏,看起来像http://www.ebay.com左侧的类别。 I am trying to have the word box and the drop box connected such as on ebay. 我正在尝试将单词框和投递箱连接起来,例如在ebay上。
When I try to do it I can not position it right to make it look the same. 当我尝试这样做时,我无法正确定位它以使其看起来相同。 My attempt came to be: http://jsfiddle.net/ctjNq/ 我的尝试是: http : //jsfiddle.net/ctjNq/
<ul id="cat_menu">
<li><a href="#">First</a>
<div class="dropdown_2columns">
<p>Drop down Content</p>
</div>
</li>
<li><a href="#">Second</a>
</li>
<li><a href="#">Third</a>
</li>
<li><a href="#">Fourth</a>
</li>
<li><a href="#">Fifth</a>
</li>
<li><a href="#">Sixth</a>
</li>
</ul>
Css: CSS:
#cat_menu {
list-style:none;
width:60px;
margin-top:5px ;
height:900px;
padding:0px 20px 0px 20px;
-moz-border-radius: 10px
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
box-shadow:inset 0px 0px 1px #edf9ff;
}
#cat_menu li {
float: left;
display:block;
postition: relative;
padding: 4px 10px 4px 10px;
margin-top:7px;
border:none;
}
All CSS is in jsfiddle. 所有CSS都在jsfiddle中。
Any ideas how I can connect the word box and the drop box to make it look one? 有什么想法可以将单词框和放置框连接起来使它看起来像一个吗?
Thanks everyone! 感谢大家!
try this 尝试这个
http://jsfiddle.net/ctjNq/9/ http://jsfiddle.net/ctjNq/9/
.dropdown_1column,
.dropdown_2columns,
.dropdown_3columns,
.dropdown_4columns,
.dropdown_5columns {
margin:4px auto;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:left;
padding:10px 5px 10px 5px;
margin-top: -24px ;
float:left;
/* Gradient background */
background:#A0A0A4;
/* Rounded Corners */
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.