Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS unbreakable link

Tags:

html

css

Ok, so I'm trying to style an "a" html element so it won't split in 2 parts when it reaches the right-hand end of the block it is places in.

Just in case I have not made myself clear enough here's an example:

I have a body of width 400 px and I have placed 3 "a" elements, each 150px in length, in it without any line breakers so naturally I will end up with the first 2 "a" elements next to the starting 100px of the 3rd one on the first row of text, and finally the 50 px rest of the 3rd "a" on the next row But i want to create the effect of having the first 2 "a"'s on the first row of text and the entire 3rd "a" on the second row of text.

Lol.

like image 336
Calin Paul Alexandru Avatar asked Oct 22 '11 18:10

Calin Paul Alexandru


1 Answers

if i understand you question right => try this

.nowrap {white-space: nowrap;}
like image 167
dknaack Avatar answered Sep 30 '22 14:09

dknaack