Avoiding double border of multiple <li>
How to avoid double border lines from list style? Please see the following script for a clear image. I want 1px the width of each window, but they are double when they come together.
http://jsfiddle.net/awaises/4SLPh/1/
HTML:
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
CSS:
ul{
margin:0; padding:0;
list-style:none;
}
ul li{
width:30%; height:200px;
border:1px solid black;
float:left;
}
thank
+4
2 answers
It is a matter of applying boundaries to ul and li selectively.
CSS
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
ul{
margin:10px; padding:0;
list-style:none;
border-left:1px solid black;
border-top:1px solid black;
overflow:hidden;
}
ul li{
width:33.3333%; height:200px;
border-bottom:1px solid black;
border-right:1px solid black;
float:left;
}
+4