To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-20-2006, 03:58 PM   #1
larryhead
Junior Member
 
Join Date: Oct 2002
Posts: 12
Question CSS font question

Hello!

I just finished a site for a client and they are complaining that they want "Helvetica Light" instead of the standard "Helvetica" that I've used. Is this possible to do in CSS? I would really hate to have to use GIF's to accomplish this.


Here is my current font definition btw:

.header_txt {
font-family: Helvetica, Verdana, Geneva, Arial, sans-serif;
font-size: 16pt;
font-weight: normal;
color: #ACACAC;
}


Thanks for any help you guys can provide!
__________________
-larryhead
larryhead is offline   Reply With Quote
Old 04-20-2006, 04:03 PM   #2
devinemke
chocoholic (with alcohol)
 
devinemke's Avatar
 
Join Date: Aug 2002
Location: NYC
Posts: 5,153
you can specify whatever font you want in your font-family list. whether that font will be used depends entirely on whether the client has that particular font installed.
devinemke is offline   Reply With Quote
Old 04-20-2006, 04:12 PM   #3
larryhead
Junior Member
 
Join Date: Oct 2002
Posts: 12
Hi devinemke, thanks for the reply. Are you suggesting something like:

font-family: Helvetica Light, Helvetica, Verdana, Geneva, Arial, sans-serif;

I wasn't sure if that would actually work... though the browser is supposed to work left to right until it finds a font the client has installed, so maybe it'll work for some people.




Also, I've tested this option out too:
font-weight: lighter;


but unfortunatley it still looks identical to:
font-weight: normal;

__________________
-larryhead
larryhead is offline   Reply With Quote
Old 04-20-2006, 04:50 PM   #4
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
Quote:
[b]Note:[b] If a family-name contains white-space, it should be quoted. Single quotes must be used when using the "style" attribute in HTML.
SO your declaration should be:
Code:
font-family: 'Helvetica Light', Helvetica, Verdana, Geneva, Arial, sans-serif;
The font-weight attribute can take the form of a digit from 100 to 700 (lighter -> bold). try using 100 as the font-weight (400 is supposed to be "normal") but older browsers (pre IE 4, NN4, FF 1) won't support this though.
bpat1434 is offline   Reply With Quote
Old 04-20-2006, 05:17 PM   #5
larryhead
Junior Member
 
Join Date: Oct 2002
Posts: 12
Quote:
Originally Posted by bpat1434
SO your declaration should be:
Code:
font-family: 'Helvetica Light', Helvetica, Verdana, Geneva, Arial, sans-serif;
The font-weight attribute can take the form of a digit from 100 to 700 (lighter -> bold). try using 100 as the font-weight (400 is supposed to be "normal") but older browsers (pre IE 4, NN4, FF 1) won't support this though.
Thanks very much! This worked beautifully.
__________________
-larryhead
larryhead is offline   Reply With Quote
Old 04-20-2006, 05:18 PM   #6
larryhead
Junior Member
 
Join Date: Oct 2002
Posts: 12
Quote:
[b]Note:[b] If a family-name contains white-space, it should be quoted. Single quotes must be used when using the "style" attribute in HTML.
Also, I check over here and saw they were using double-quotes around the font families w/ whitespace...
http://www.w3.org/TR/REC-CSS2/fonts....nt-family-prop

So maybe you only need single-quotes if your styles are all inline?

Not sure.. but thanks again for your help!
__________________
-larryhead
larryhead is offline   Reply With Quote
Old 04-20-2006, 06:37 PM   #7
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,128
If you're using the styles inline - i.e., as HTML attribute values - then the quoting style you use to delimint font-family names would have to be the opposite of the one you're using to quote the attribute values. If your attribute values were single-quoted, then you'd need to use double quotes in the CSS. (The reason for all of this should be obvious ).
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Last edited by Weedpacket; 04-20-2006 at 06:40 PM.
Weedpacket is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:35 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.