|
| |
|
|
erinatkins
Posts: 3072 From: Mechanicsville VA USA Status: offline
|
CSS style question - 5/20/2003 13:45:05
I am trying to have 2 basic styles for a paragrah. 1 bold one without Will this work? p { color: 0033cc; background-color: transparent; font-size: 14px; font-weight: normal; } p1 { color: 0033cc; background-color: transparent; font-size: 14px; font-weight: bold; } Than to get it it to work would I just put <p1> before text & </p1>after text
_____________________________
All Hail Great Spooky - Master of the Outfront Forums. He can make you or break you.
|
|
|
|
Reflect
Posts: 4767 From: USA Status: offline
|
RE: CSS style question - 5/20/2003 14:16:27
.p1 { color: 0033cc; background-color: transparent; font-size: 14px; font-weight: bold; } <p class=" p1" >Text</p> By making it a class you can also use it for any HTML tag that you want the text to appear as the same be it <p>, <h3>, etc.. <edit> Or to play off of inheritance you could... p { color: 0033cc; background-color: transparent; font-size: 14px; font-weight: normal; } p.p1 { font-weight: bold; } <p class=" p1" >Bold text</p> </edit> Brian
< Message edited by Reflect -- 5/20/2003 2:29 PM >
_____________________________
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: CSS style question - 5/20/2003 14:57:53
You can also set that up as a generic class and then use it with other elements... .bold{ font-weight:bold; } Then, wherever you need to use it, you can combine multiple classes with one element... <p class=" main bold" > <li class=" ind bold" > Do this to reduce the amount of code in your style sheet. I just learned this one not long ago and it really opened my eyes on how to effectively trim the bloat from your style sheets.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|