Unwrap those URLs

You have a paragraph with a URL in it–chances are the boundaries might wrap or cut your URL into two lines.

Notice that it is an actual URL in the form of http://[address] and not just a linked bunch of text.

[code lang=”html” gutter=”false”]<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nisi ante, hendrerit sed pretium id, fermentum sed tellus. Integer venenatis, turpis in tempus cursus, odio sapien tincidunt mi, in iaculis nibh nisl eget metus. Proin ultrices elit non nisl vehicula suscipit <a href="#">http://www.double-u-double-u-double-u-dot-wawawa.com</a>. Suspendisse interdum nisl ac risus consectetur ut hendrerit tellus aliquam.</p>[/code]

Why don’t we like that? Because it’s supposed to be in one unit.

So, add a class to the anchor tag:
[code]
<a class="url" href=""#">[URL]</a>
[/code]

and tell CSS to:
[code lang=”css”]
.url {white-space:nowrap;}
[/code]

That should put the whole URL link in one line.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *