Forum Moderators: not2easy

Message Too Old, No Replies

Keeping multiple words on one line

         

partha

12:34 am on Jul 1, 2005 (gmt 0)

10+ Year Member



I have:

<a class="NavLink YouAreHere" href="notificationPrefs.php">Notification Preferences</a>

.NavLink {
margin: 0.5em;
padding: 0.4em;
}

.YouAreHere {
text-decoration: none;
color: white;
background-color: #231c25;
padding: 0.4em;
}

--------------------
>>When I shrink the browser window so that link can't fit on one line, it breaks it between the two words. How do I keep both words together on the same line?

tedster

1:25 am on Jul 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Enclose in a container element with enough width to handle the links. Then if the window gets too narrow you should get a horizontal scrollbar instead of a line break.

SuzyUK

7:16 am on Jul 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi partha,

you could also use white-space: nowrap; property on either of the link classes you have if you don't want a fixed width.

Suzy