Link to home
Create AccountLog in
Avatar of GizmoBlaster
GizmoBlaster

asked on

How to make a span NOT break line while using display:block;

Hi,

I'm beginner-level in CSS and I'm trying to do a fixed width class for a block (class bb in attached example) that will also NOT break the line so I can add a link on the right.

Yet, to have it at fixed width i have to use display:block but the only way i know to prevent line break is to put "display:inline", yet it cancels the display:block behavior and the class adjusts to the width of the text in the bb class...

it seems like a very basic question, however, no matter what search terms i try, there's no way I can find an answer to that on the Internet.

So my question is: how can I have a fixed width BB class and keep the following link on the SAME line.

Thanks

( see the attached sample )
ztest.txt
Avatar of David S.
David S.
Flag of United States of America image

Give the bb class float:left
ASKER CERTIFIED SOLUTION
Avatar of zemond
zemond

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of GizmoBlaster
GizmoBlaster

ASKER

Thanks guys.
Thanks guys that worked well. Just for the record, the even simpler solution turned out to include the "clear:both" in the bb class, which spares me the trouble of adding a div.

Thanks again!