Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Really simple question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey,
I've seen this done before, and I've done it myself before, but I don't remember exactly how.What I want to do is change the text background to a different color. Its a cascading style sheet thing.

So that the text will appear to be highlighted... if you know what I mean.Thanks!
-NeXius
 
<style>
.textIdName {background-color:#0000FF;}
</style>

and then you have to put your text in a div:

<div id=&quot;textIdName&quot;>this text will have a blue background</div>

is that what you wanted?
theEclipse
eclipse_web@hotmail.com
robacarp.webjump.com
**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
You can actually just style the <p> tag containing the text if you wish, or use a <b>:

<b style=&quot;font-weight:normal;background-color:#0000FF&quot;>Highlighted text</b>

Since sometimes Div's are inconvenient.Remember every tag has a style attribute, even form elements.

-Ben &quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top