user6467650 user6467650 - 1 year ago 52
CSS Question

How to prevent splitting of anchor tag text across two lines while resizing?

I have an anchor tag where I display the name of the person logged in. The problem is that when I resize the browser window, the name gets split across two lines. How to prevent it?

Answer Source

Check out this JSFiddle.


<a href="" class="dontwrap"> Ricky Dam </a>


.dontwrap {
  white-space: nowrap;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download