Skip to content Skip to sidebar Skip to footer

Css Bottom Border Hover "jitter"

I have a navigation bar which I would like to give an orange bottom border when you hover over the navigation buttons. Only problem is that whenever you hover, the border makes the

Solution 1:

The jittering seems to be caused by adding the extra 2px border at the bottom when you hover. That causes the text to rise up a bit. To fix this, make sure there's always a 2px border by changing your #navBarTop li a to this:

#navBarToplia {
    display: block;
    padding: 10px25px;
    text-decoration: none;
    font-family: "Arial";
    color: #00ffff;
    border-bottom: 2px solid transparent;  // <--- add this line
}

That should stabilize things for you.

Post a Comment for "Css Bottom Border Hover "jitter""