Suppose you have this html:
<span> aaa </span> <a> bbb </a>
<br>
<span> ccccccc </span> <a> dddd </a>
You need the span to be of a certain width, so there is a certain layout.
How do you do this without resorting to floating divs?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could style the spans to be
display: block, orinline-block(IE sometimes has issues with this) and then define the width.Why? Well, span is a inline elmenent, and you cannot define width and height on inline elements, so you must “convert” the span to a block element.