Non-anchor gasket

My text inside the anchor does not accept registration, but the addition is applied when it freezes. That's why my web structure is just moving on the go. Please, help.

+7
source share
6 answers

Anchor links or inline elements; they cannot have paddings. Creating their inline box should work.

Just add:

a
{
    display:inline-block;
}
+18
source

You need to apply display:blockeither display:inline-blockto the binding

+4
source

CSS display:block

<a href="#" style="display:block; padding:4px ">Click here</a>
+3

- , , . . inline-block block .

<a href="#" style="display:block;padding:10px">Click here</a>
+3

As you use padding, I assume that you also have a certain background-colorand possibly border. If you use border, make sure the link is set to the same in all states border-width; in states you don’t want to show, set the color to the same color as your background. When you do this, it will not move the text around it when you hover / click on it.

0
source
<a href="#" class="btn btn-info" role="button">button</a>
-1
source

All Articles