Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird vertical space between div and ul
    text
    copied!<p>here is a fiddle ( <a href="http://jsfiddle.net/zq3YA/2/" rel="nofollow">http://jsfiddle.net/zq3YA/2/</a> ) 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. </p> <p>Here is the html : </p> <pre><code>&lt;div class="selector"&gt; &lt;div class="selector-select"&gt; &lt;div class="selector-value"&gt;&lt;/div&gt; &lt;a href="#" class="selector-button"&gt;&lt;/a&gt; &lt;/div&gt; &lt;ul class="selector-list"&gt; &lt;li class="selector-item"&gt;Toto&lt;/li&gt; &lt;li class="selector-item"&gt;Titi&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>Here is the css code : </p> <pre><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; } </code></pre> <p>Do you have any idea of what happends ?</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload