css - How do I reduce the distance between the border-bottom and parts of text? -


i'm building website , i've run problem. here webpage.

i want add 3px underlines links, this:

http://i.stack.imgur.com/kgrjl.png

the line height of text 56pt, border-bottom far far away links. text-decoration: underline thin, , way close.

they need half distance. negative padding doesn't exist, how should go fixing it?

now used code (this demo)

css

.hometext p { color: red; text-decoration: none; position: relative; display: inline-block; vertical-align: top; } .hometext p a:hover:after{     content:'';     position:absolute;     left:0;     right:0;     bottom:-3px;     border-bottom:solid 1px red;  } 

demo link


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -