I have a rectangular div
, like the one above. I want to remove the bottom border (from C to D) in my div
. How can I do this?.
Edit: Here is my CSS:
#index-03 { position: absolute; border: .1px solid #900; border-width: .1px; border-style: solid; border-color: #900; left: 0px; top: 102px; width: 900px; height: 27px; }
<div id="index-03" style="background-color:limegreen; width:300px; height:75px;"> </div>
We can specify the no border property using CSS border: none, border-width : 0, border : 0 properties. Approach 1: We will give border-color, border-style properties to both headings, for showing text with border and no-border. For no border heading, we will use the border-width : 0 which will result in no border.
The border-bottom shorthand CSS property sets an element's bottom border. It sets the values of border-bottom-width , border-bottom-style and border-bottom-color .
Just add in: border-bottom: none;
#index-03 { position:absolute; border: .1px solid #900; border-bottom: none; left:0px; top:102px; width:900px; height:27px; }
You can either set
border-bottom: none;
or
border-bottom: 0;
One sets the border-style
to none
.
One sets the border-width
to 0px
.
div { border: 3px solid #900; background-color: limegreen; width: 28vw; height: 10vw; margin: 1vw; text-align: center; float: left; } .stylenone { border-bottom: none; } .widthzero { border-bottom: 0; }
<div> (full border) </div> <div class="stylenone"> (style)<br><br> border-bottom: none; </div> <div class="widthzero"> (width)<br><br> border-bottom: 0; </div>
Side Note:
If you ever have to track down why a border is not showing when you expect it to, It is also good to know that either of these could be the culprit. Also verify the border-color
is not the same as the background-color
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With