Note that there are some explanatory texts on larger screens.

plurals
  1. POUL list-style-image providing unneeded padding
    primarykey
    data
    text
    <p>I have a list that resembles:</p> <pre><code>&lt;ol&gt; &lt;li class="node"&gt;1&lt;/li&gt; &lt;li class="node"&gt;2&lt;/li&gt; &lt;li class="node"&gt;3&lt;/li&gt; &lt;li class="node"&gt;4&lt;/li&gt; &lt;li class="node_end"&gt;5&lt;/li&gt; &lt;/ol&gt; </code></pre> <p>I am using images to replace their default bullet points in CSS. Separate images are used for the end node as well as another image for all other bullet points. The images display, however as soon as I add these images a 4 pixel padding is somehow added to the top and bottom of each list item. This extra spacing changes the height from 26 pixels high to 34 pixels high. This gap provides about an 8 pixel separation between the different bullet point images which were meant to have a 0px separation as per my design.</p> <p>The CSS I made:</p> <pre><code>li { margin: 0; padding: 0; border: 0; } li.node { list-style-image: url('../imgs/nodes/udr.png'); } li.node_end { list-style-image: url('../imgs/nodes/ur.png'); } </code></pre> <p>Is there any way to remove this spacing? I have tried removing all things padding/spacing/border related to all li's, but nothing so far.</p> <p><strong>EDIT:</strong></p> <p>I do not think I am making my question clear enough, so I am posting the image of what it looks like on my end.</p> <p><img src="https://i.stack.imgur.com/8wxWV.png" alt="Example of what the problem is."></p> <p>The joining bars as you see in the image above are supposed to be connected (as if one continuous image). Removing the special CSS images for bullet points reduces the height of each item to the height of the CSS bullet point image (as I have tested using Google Chrome's element inspecting tool).</p> <p><strong>EDIT 2:</strong></p> <p>A close example to show my problem can be found here: <a href="http://jsfiddle.net/EyVRF/1/" rel="nofollow noreferrer">http://jsfiddle.net/EyVRF/1/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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