here is a fiddle ( http://jsfiddle.net/zq3YA/2/ ) showing the thing I'm trying to correct. I want to make a stylish , and so I want a list (ul) to be placed just under a bordered container (div). The problem is that I have an unwanted vertical space between them. I've already tried to removed the margin etc., but nothing works.
Here is the html :
<div class="selector">
<div class="selector-select">
<div class="selector-value"></div>
<a href="#" class="selector-button"></a>
</div>
<ul class="selector-list">
<li class="selector-item">Toto</li>
<li class="selector-item">Titi</li>
</ul>
</div>
Here is the css code :
.selector
{
width : 200px;
}
.selector-select
{
margin : 0;
padding : 0;
position : relative;
}
.selector-select, .selector-value
{
display : inline-block;
height : 20px;
}
.selector-select, .selector-list
{
border-style : solid;
border-width : 1px;
min-height : 1px;
}
.selector-value
{
width : 180px;
}
.selector-button
{
display : inline-block;
width : 20px;
height : 100%;
background-color : blue;
position : absolute;
right : 0;
top : 0;
}
.selector-list
{
width : 170px;
list-style-type : none;
margin : 0;
padding : 0;
}
.selector-item
{
margin : 0;
padding : 0;
}
.selector-item:hover
{
background-color : blue;
}
Do you have any idea of what happends ?
Thanks in advance.