Sometimes, we want to set a width and height on an A tag with CSS.
In this article, we’ll look at how to set a width and height on an A tag with CSS
How to set a width and height on an A tag with CSS?
To set a width and height on an A tag with CSS, we make the a element a block or inline-block element.
For instance, we write
a {
display: inline-block;
width: 100%;
}
to make a
elements inline block elemenets with display: inline-block;
.
Then we can set the width for them.
Conclusion
To set a width and height on an A tag with CSS, we make the a element a block or inline-block element.