I'm wondering if it's possible in CSS to make a border but only for corner. Something like this:
**** **** * * * * CONTENT * * * * **** ****
To make an invisible border, set the BORDER attribute to 0. (Although most browsers default to a table border of 0, specifically stating it ensures that the border will be invisible in all browsers.)
Using Inline Style attribute Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the inline property for adding the border. Step 2: Now, place the cursor inside the opening tag of that text around which we want to add the border.
Assuming <div id="content">CONTENT</div>
and that CONTENT
includes at least one HTML node.
#content {position:relative} #content:before, #content:after, #content>:first-child:before, #content>:first-child:after { position:absolute; content:' '; width:80px; height: 80px; border-color:red; /* or whatever colour */ border-style:solid; /* or whatever style */ } #content:before {top:0;left:0;border-width: 1px 0 0 1px} #content:after {top:0;right:0;border-width: 1px 1px 0 0} #content>:first-child:before {bottom:0;right:0;border-width: 0 1px 1px 0} #content>:first-child:after {bottom:0;left:0;border-width: 0 0 1px 1px}
Here's a Fiddle
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