I'm making a simple t开发者_开发知识库abbed interface out of divs. Can someone offer a way of making a div have a bottom border width of 0px, otherwise I get a 1px gap between the tab div and the tab content. Do I use border-left
, border-right
and border-top
instead of border
and border-bottom: 0px;
?
Thanks,
James
You can use:
border-width: 1px;
border-bottom-width: 0px;
Sets all to 1px and then overrides the bottom to 0px.
Also valid is the shorthand:
border-width: 1px 1px 0 1px;
Where the third value is the bottom width (top, right, bottom, left)
When you use border it goes clockwise, and repeats the non specified parts on the mirror.
So you want: border-width: blah blah 0px blah
Also, are you sure it's the border? It could also be the padding or margin (<- more likely).
When you have two DIV's as siblings, like so:
<div> One </div>
<div> Two </div>
then, by default, there is no space between them.
Proof: http://jsfiddle.net/simevidas/wm7GA/
Use css reset as first included css file.
精彩评论