I've been looking at these two topics dealing with line breaks between tags:
Both would solve my problem if it were not for one detail: I need the <a>
links to have the display: inline-block
property so that I can apply a scale
to :hover
. Without this property scale
has no effect.
On the other hand, if I apply display: block
to the links (or do not specify any display
), they will occupy the full width of the div-parent where they are, which is not desirable . I would like the link to be restricted only to the area of the text it contains, not the entire width of the div-parent .
Something like this:
I could simply put a <br>
after each link, but I know semantically <br>
can not be used to break lines between tags, just in text.
Is there any way to break these lines between <a>
tags without they occupying the entire width of the div-parent ?