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!

modifying styles by selector

Status
Not open for further replies.

GIGN

Programmer
Oct 6, 2000
1,082
NZ
I can't find the thread which had how to change a an entire style, like for a whole selector - jaredn I think answered it - can you break me it off again? Cheers -Bj.
b2 - benbiddington@surf4nix.com
 
Hi bangers!

Here's an example how to use classes and id's.
Let's say, you have such a style definition:

p { font-size: 12pt; font-family: times, serif; text-indent: 50px; text-align: justify; color: white }

in order to change a color of text you may create a style class named "one":

.one { color: #ccff00 }

and to change font and to add bold weight to it you may create selector:

#two { font-family: arial, sans-serif; font-weight: bold }

Then, if you want to modify your <P> text, you write this:

<p class=one>the text</p>
or

<p id=two>the text</p>
or

<p class=one id=two>the text</p>

Hope it is what you wanted to know. If not, specify exactly what you need.

Andrew | starway@mail.com
 
Thanks for the insult man. Don't worry I've figured it out.
b2 - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top