4 replies [Last post]
Luxtable
Offline
newbie
Last seen: 7 years 30 weeks ago
Joined: 2007-01-19
Posts: 4
Points: 0

Is there any way with css to have every first word in every paragraph to be either bold or a different color? If so what is the coding for that?? Thanks ahead of time.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 33 weeks 1 day ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

<span> the word then style

<span> the word then style the span based on it's parent p span{font-weight:bold;} or class the span .fword {font-weight:bold;}

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Luxtable
Offline
newbie
Last seen: 7 years 30 weeks ago
Joined: 2007-01-19
Posts: 4
Points: 0

Thanks for getting back to

Thanks for getting back to me so quick Hugo.

Im new at this and still dont get it.

Here is the code im using for the bold type. (the only type I want bold in the paragraph is Information.

Information: (716) 874-5600

But this is the include file for an asp page I have that has 2 css attached to it. So im not sure what to do to make this work. Sorry for the newbie attitude.

Thanks Again.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Milton Keynes
Last seen: 2 weeks 6 days ago
Milton Keynes
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

Instead of generating the

Instead of generating the strong tag, have it generate this:

Information: (716) 874-5600

then in your CSS (either one, it doesn't matter) use this:

p span { font-weight: bold; color: yellow; font-size: 40px; }

Verschwindende wrote:
  • CSS doesn't make pies

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 33 weeks 1 day ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

Mildly confused now that you

Mildly confused now that you have said that you already genrate a <strong> element . This element is already emboldened is it just that you don't want the actual tag?

looking at the markup content might suggest a better set of elements such as perhaps a dl list.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me