Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent line breaks before or after `<a>` tag

Tags:

html

css

I have an ebook which contains a code like:

Some text (<a id="aref"></a>Some more text) that continues

I need the anchor to refer to this part of the text in the index. However, the tag allows line breaks, so I often end up with a line break right after (.

Is there a way to prevent these line breaks (putting the anchor before the ( is not an option).

like image 434
raphink Avatar asked Dec 27 '22 18:12

raphink


1 Answers

Make your anchor tag inline using the CSS property display: inline, for example:

 <a style="display: inline;" >
like image 85
maximus ツ Avatar answered Dec 29 '22 09:12

maximus ツ