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

Joshua Olson joshua at waetech.com
Thu Jul 3 08:38:13 CDT 2003


----- Original Message ----- 
From: "David Turner" <david.turner at synergy.tv>
Sent: Thursday, July 03, 2003 9:30 AM


> hi all,
>
> 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.

DIV's are block level elements by default and therefore will always force a
new line.  Some people will probably provide a better solution, but try
using a "span" instead of a "div":

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

As an aside, by naming the classes after the description of the styling you
are someone missing the paradigm shift of late.  You may consider naming the
class that formats phone numbers as "phone" or something that represents
what the content symantically means.

Example:

<p class="maincontent">
  Fill in this form or phone
  <span class="phone">0113 123456</span>
  for more information
</p>

HTH,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list