Author:Kostas Sp Published On:October 23, 2014 Under:UI
In this post I will show you a simple but an effective way to underline text with CSS
First the necesairy html code
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <p>This text will be underlined</p> <span class="print_underline"> </span> </body> </html> |
The relevant css code is
span.print_underline { display: inline-block; height: 1px; border-bottom: 1px solid #000; width:100%; } |
See a live fiddle here
http://jsfiddle.net/kostasp/y2qh7n91/