943,800 Members | Top Members by Rank

Ad:
Nov 28th, 2008
0

css - font issue

Expand Post »
hello everyone, i hope you could help me with this simple yet confusing css problem.. I want to have a three header - h1, h2, h3 to be in different font style... one is tahoma, arial and sans-serif.... how can i do that by calling the css below...

css Syntax (Toggle Plain Text)
  1. body, h1, h2, h3, form {
  2. font: 10px tahoma, arial, sans-serif;
  3. margin: 0;
  4. padding: 0;
  5. color: #5C5C5C;
  6. }


you're help is highly appreciated
Last edited by peter_budo; Nov 29th, 2008 at 6:21 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 4
Solved Threads: 1
Light Poster
jk_bscomp is offline Offline
46 posts
since Apr 2007
Nov 28th, 2008
0

Re: css - font issue

You can't doing it using this code.
The css style you provided is useful when you want to define some general attributes for multiple tags.

In order to achieve yours, you have to explicitly specify the font family for each h# element.
you should do it like this
h1 {font-family: Tahoma;} - you can omit this definition, as it has been already defined in your general definitions.
h2 {font-family: Arial;}
h3 {font-family: sans-serif;}
Reputation Points: 21
Solved Threads: 26
Posting Whiz in Training
Rhyan is offline Offline
240 posts
since Oct 2006
Dec 4th, 2008
0

Re: css - font issue

you can give different classes or different fonts, with using important tag
Reputation Points: 11
Solved Threads: 0
Newbie Poster
shruti sepra is offline Offline
19 posts
since May 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: what is the difference between html and css?
Next Thread in HTML and CSS Forum Timeline: button text...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC