Reputation: 345
For an odd reason, my 6 borders seem a little garbled.
Here's an image:
Here's my chunk of CSS for that list:
#aboutcontent #names li{
width: 325px;
border: 1px solid white;
display: inline-block;
font-size: 12px;
line-height: 25px;
}
I'd like all those borders touching perfectly, no space in between.
Here's a jsfiddle
Upvotes: 1
Views: 681
Reputation: 11
Seen on css-tricks.com
The most easy way. Close the li tag on the next line! It seem wired, but it really works.
Example:
<ul>
<li>one</li
><li>two</li
><li>three</li>
</ul>
Upvotes: 1
Reputation: 7257
Give ul
font-size: 0
or remove whitespaces between li. Inline-block elements considers the whitespaces too. You can read about this here.
<li></li>...<li></li> // remove whitespace between li
Or
#aboutcontent #names{
list-style-type: none;
font-size: 0;
}
Upvotes: 2
Reputation: 7207
Add float:left;
instead of inline-block
in your #aboutcontent #names li
CSS:
#aboutcontent #names li{
float:left;
}
Upvotes: 0
Reputation: 108
try this
#aboutcontent #names li{
width: 325px;
border: 1px solid white;
float:left;
font-size: 12px;
line-height: 25px;
margin: 0 7px 5px 0;
}
Upvotes: 1