 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Wag
Joined: 04 Mar 2008 Posts: 4
|
Posted: Tue Mar 04, 2008 11:38 am <p> paragraph setup |
|
|
|
What does a person do if they want ....say different colored text in some paragraghs?
p {color: rgb(0,0,255)}
How do you distinguish what you want to happen in different paragraphs?
Can you use....
p1 {color: rgb(0,0,255)}
p2 {color: rgb(0,0,255)}
What would the relating body code be? |
|
sticks464
Joined: 31 Dec 2006 Posts: 1164
|
Posted: Tue Mar 04, 2008 12:16 pm |
|
|
|
You can give each paragraph a class id and style each one regardless of where it is located in the body
| Code: |
<p class="one">Some text</p>
<p class="two">Some text</p>
<p class="three">Some text</p> |
css
| Code: |
body {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: .75em;
color: black;
line-height: 16px;}
.one {color: red; font-family:Arial, Helvetica, sans-serif;}
.two {color: green; font-style: italic;}
.three {color:blue; text-transform:uppercase;}
|
The body style sets the font, size, color and space between lines for the whole page. You can change the attributes for individual text blocks with their own styles. These styles will only effect the paragraphs with the class name assigned. |
|
Wag
Joined: 04 Mar 2008 Posts: 4
|
Posted: Tue Mar 04, 2008 1:43 pm re |
|
|
|
Thanks for the reply, I'll try that  |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|