navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

CSS style question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS style question
Page: [1]
 
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 >


_____________________________


(in reply to erinatkins)
erinatkins

 

Posts: 3072
From: Mechanicsville VA USA
Status: offline

 
RE: CSS style question - 5/20/2003 14:31:55   
That makes sense. :)

Thanks for explaining it. Will probably be back with more questions.:)

_____________________________

All Hail Great Spooky - Master of the Outfront Forums. He can make you or break you.

(in reply to erinatkins)
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

(in reply to erinatkins)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS style question
Page: [1]
Jump to: 1





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