|
-
Mar 14th, 2006, 02:36 PM
#1
Thread Starter
Frenzied Member
font bgcolor css
I need to set the font backgroundcolor via css but there are no tags assosiated with the font can i do that ?
also i have font in a td table, and want to set that fonts backcolor also but not affect the td
-
Mar 14th, 2006, 04:32 PM
#2
Fanatic Member
Re: font bgcolor css
I can't find a way to make it so that all text in the body has a certain background color, but you could just use the Paragraph tag and change the text and background color from there.
P {color: orange ; background-color: blue}
-
Mar 14th, 2006, 05:12 PM
#3
Re: font bgcolor css
Wrap the text in a span and apply background to that.
HTML Code:
<span class="highlighted">This text should appear with yellow background</span>
Code:
.highlighted
{
background: yellow;
}
As the span tag is displayed inline it will only occupy the space containing the text and not expand its height or width to fit the containing element like a block element would.
-
Mar 15th, 2006, 05:29 AM
#4
Thread Starter
Frenzied Member
Re: font bgcolor css
thanks guys, both suggestions are fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|