css - font issue

Reply

Join Date: Apr 2007
Posts: 46
Reputation: jk_bscomp has a little shameless behaviour in the past 
Solved Threads: 1
jk_bscomp jk_bscomp is offline Offline
Light Poster

css - font issue

 
0
  #1
Nov 28th, 2008
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...

  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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: css - font issue

 
0
  #2
Nov 28th, 2008
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;}
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 19
Reputation: shruti sepra is an unknown quantity at this point 
Solved Threads: 0
shruti sepra shruti sepra is offline Offline
Newbie Poster

Re: css - font issue

 
0
  #3
Dec 4th, 2008
you can give different classes or different fonts, with using important tag
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC