I've got a list of links, but I can't get the spacing right. The list is displayed in a narrow column, so the link sometimes breaks across lines. When it does, there is a fairly big gap between the first line of the link and the second e.g. "A link to something" will have "A link to" and a gap between the next line that says "something". How can I close the gap?
CSS:
.menuUrl {
padding: 0em 0em;
margin: 0em 0em;
}
ul {
padding: 0em 0em .1em 0em;
margin: 0em 0em 0em 1.1em;
list-style-type:disc;
}
li {
margin: 0em 0em;
padding: 0em 0em;
}
HTML
<ul>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"a.html" class="menuUrl">A link to something</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"b.html" class="menuUrl">Another link</a></li>
</ul>
Note: I found when I did <a><li></li></a> that it closes the gap but I don't think it's valid HTML.Don't worry, I worked it out. I added display:block; into .menuUrl.
CSS:
.menuUrl {
padding: 0em 0em;
margin: 0em 0em;
}
ul {
padding: 0em 0em .1em 0em;
margin: 0em 0em 0em 1.1em;
list-style-type:disc;
}
li {
margin: 0em 0em;
padding: 0em 0em;
}
HTML
<ul>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"a.html" class="menuUrl">A link to something</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"b.html" class="menuUrl">Another link</a></li>
</ul>
Note: I found when I did <a><li></li></a> that it closes the gap but I don't think it's valid HTML.Don't worry, I worked it out. I added display:block; into .menuUrl.