iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old May 29th, 2008, 02:05 PM   #1
New Member
 

Join Date: May 2008
Location: Africa
Age: 21
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Randomite is on a distinguished road
Different sizes for alternative fonts?

Hi,

This might be a rather strange request but I was wondering if it is possible to assign a different font size for alternative fonts?

Example:
Font: 14px arial, verdana;

Now obviously if the users system does not have arial installed it will use verdana at 14px. Is it possible to change the size of the font (verdana) then? So if arial (at 14px) is not on the users system it will use verdana (at say 12px) ?

Is this at all possible?
Look forward to your responses
Thanks
Randomite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 02:11 PM   #2
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Different sizes for alternative fonts?

I think the best way to do this is assign the particular piece of centent a div, such as

<div id="main">

and then assign a text size and font to that particular div
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 02:22 PM   #3
New Member
 

Join Date: May 2008
Location: Africa
Age: 21
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Randomite is on a distinguished road
Re: Different sizes for alternative fonts?

Thanks for the reply, but I don't think that will work in this situation, because the browser will read the new font size regardless, thus making the defualt font the same size. Does that make sense?
Randomite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 02:30 PM   #4
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Different sizes for alternative fonts?

Sorry mate not quite sure what you mean, what is it you are aiming to do?
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 02:47 PM   #5
New Member
 

Join Date: May 2008
Location: Africa
Age: 21
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Randomite is on a distinguished road
Re: Different sizes for alternative fonts?

Basically trying to get the alternative or 'back up' font to be a different size to the originally assigned font.

So, if the user computer does not have (14px) arial installed it will instead show verdana at 12px. Variation of font sizes depending on what the users computer has installed. Does that make more sense?
Randomite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 02:49 PM   #6
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Different sizes for alternative fonts?

Yeh i get what your doing now, not too sure how you would do this though sorry mate :S
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 29th, 2008, 03:58 PM   #7
New Member
 

Join Date: May 2008
Location: Africa
Age: 21
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Randomite is on a distinguished road
Re: Different sizes for alternative fonts?

No problem. Any else got any other ideas?
Randomite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 1st, 2008, 08:04 AM   #8
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: Different sizes for alternative fonts?

I see what you're trying to do, and I think the only way you could solve this would be with the help of JavaScript font detection.

Ok, so it's not the *ideal* solution, but it will work in most cases (and should degrade nicely if the user has JavaScript disabled).

I've only just stumbled on this script myself, so not sure how it works exactly. However, I think it returns an array of available fonts, so you'd simply need to check if the font you're using is in that array - if it's not, serve up the new CSS font-size, otherwise leave it be
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


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

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
avatar sizes Gerry The Café 15 September 2nd, 2007 07:22 AM
IE CSS Hell - Font Sizes In IE & FF weasel HTML, XHTML and CSS 2 August 18th, 2007 01:41 PM
Page Sizes Maverick25r HTML, XHTML and CSS 11 February 26th, 2007 01:24 PM
css font sizes problem jesse22 HTML, XHTML and CSS 7 October 23rd, 2006 02:04 PM
image sizes benbacardi Classic ASP 5 May 24th, 2005 04:57 PM


Search Engine Optimization by vBSEO 3.2.0 RC8