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

 

Changing Font Sizes, Colors, Etc. in Style Sheets

 
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 >> Changing Font Sizes, Colors, Etc. in Style Sheets
Page: [1]
 
Edge

 

Posts: 164
Joined: 10/12/2004
From: South Carolina
Status: offline

 
Changing Font Sizes, Colors, Etc. in Style Sheets - 6/14/2006 17:20:23   
Please forgive me if this has been asked and answered before, but I have not been able to find an answer using various search keywords.

I am very new to CSS, so I set up my external style sheet using abbeyvet's tuturial (very nice by the way :)), and decided to add different types of fonts.

Changing font size and color etc. for the normal font "p" is straightforward. Any change to size and color works in both IE and FF.

But I tried adding a different fonts and it works in IE, but not FF.

Example:
P {font-family: Verdana, Arial; font-weight: normal; font-size: 10pt; color: white;}

P.2 {font-family: Verdana, Arial; font-weight: normal; font-size: 12pt; color: red;}

If I specify "P.2"; it appears fine in IE, but in FF it will use the default "P".

http://www.bennygordon.us/benny.htm

How should I create different fonts like the headers do (H1, H2, H3, etc.)? Changing these works in both IE and FF as intended.

Any help is appreciated. Thanks, Ed




_____________________________

Time is short, are you ready?
Tailslide

 

Posts: 6267
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Changing Font Sizes, Colors, Etc. in Style Sheets - 6/14/2006 17:28:55   
Hi Ed

Off-hand (dragging something up from the back of my memory so may not be completely right) I think that you can't start class and id names with a number (can't quite remember if a single letter/digit is ok). Try changing the name of the class and it should work.

Not sure what you're after regarding the headings - did you want to style those too? If so then it's just

h1 {whatever rules you want;}


or even

h1, h2 {color:red;}




_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to Edge)
Edge

 

Posts: 164
Joined: 10/12/2004
From: South Carolina
Status: offline

 
RE: Changing Font Sizes, Colors, Etc. in Style Sheets - 6/14/2006 17:56:34   
quote:

I think that you can't start class and id names with a number (can't quite remember if a single letter/digit is ok). Try changing the name of the class and it should work.


Perfect! I changed the "P.2" to "P.F2" and it works for both IE and FF.

Regarding the headings, yes I wanted to change the font size, color, etc. But I did that and it worked from the beginning. I was only having problems setting up different types of fonts.

Thanks for your prompt response and help.

Ed

_____________________________

Time is short, are you ready?

(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Changing Font Sizes, Colors, Etc. in Style Sheets
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