[thelist] preventing a CR in when using different colours in a paragraph

Boris Mann boris at bmannconsulting.com
Thu Jul 3 08:42:11 CDT 2003


On Thursday, July 3, 2003, at 09:30 AM, David Turner wrote:

> i am trying to write a paragraph of text using style sheets, with some 
> of
> the text in a different colour, but it is adding a CR that i dont want.
>
> i want the following text to appear with the phone number to be white, 
> and
> the rest of the text in black.
<snip>
> <div class="formText-black">Fill in this form or phone </div>
> <div class="formText-white">0113 123456 </div>
> <div class="formText-black">for more information</div> <br>
<snip>

A div is a block element, meaning that without doing funky floats or 
other stuff, it will stretch the width of the containing element (and 
not have something sit next to it).

Use <span> for inline formating...

<p class="formText-black">Fill in this form or phone <span 
class="formText-white">0113 123456</span> for more information.</p>

Cheers,

--
Boris Mann
http://www.bmannconsulting.com



More information about the thelist mailing list