Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 03-28-2008, 08:50 PM Text size
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
In my css template, http://www.outdoorhighadventure.com/style.css, I would like to make the default text size to be size 2. How could I fix this? In the css code it says the body text is 12px. IS that size 2? Thanks. Sorry, I'm new at css!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
 
Register now for full access!
Old 03-28-2008, 09:14 PM Re: Text size
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
http://www.w3.org/TR/CSS21/fonts.html#font-size-props

For font size 2 in css would be
Code:
font-size: small;
I perfer using em where 1em is the normal text size of the users browser. Incrementing is done for example with 1.1em etc. or decreasing 0.9em, etc.
joder is offline
Reply With Quote
View Public Profile
 
Old 03-28-2008, 09:52 PM Re: Text size
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I really don't recommend font-size: small as the parent font-size for your entire document. I always do this:
Code:
body {
    font-size: 62.5%;
}
Now, all fonts in the document can be expressed in em's, where each .1em equals one pixel. Having resizable fonts makes a huge difference when designing pages for maximum accessibility
__________________
Join me on
Please login or register to view this content. Registration is FREE

Last edited by wayfarer07; 03-28-2008 at 09:54 PM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-28-2008, 10:12 PM Re: Text size
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
Okay, Wayfarer07, so if I want to express the font size in em's, then what size would 2, or small, be? Also, explain how I get and use resizable fonts. I have been looking into adding the feature to make the text larger, so how do I start that? Thanks.
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Old 03-28-2008, 11:12 PM Re: Text size
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I did a simple test to determine the size in pixels for font-size: small (I wasn't sure), and found that font-size: small = 13px. Therefore, with the font-size set to 62.5% in the body as outlined above, a font-size of 1.3em would be equal to font-size small at default browser settings.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-28-2008, 11:35 PM Re: Text size
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
I did all four text sizes in both IE and FF and
small was about 13px in FF but 13px was smaller in IE
62.5% was noticeably smaller than small in both browsers.
1.3em was much larger in both browsers.
joder is offline
Reply With Quote
View Public Profile
 
Old 03-29-2008, 01:37 AM Re: Text size
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Ok, I only tested in Firefox. If this is true, it is pretty much like saying that we shouldn't use these references (ever) when assigning font-sizes. The em should also never be used as the parent for the entire document, as it is not consistent across all browsers (except when relative to a percentage). Also, beware of mixing px with em!
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-29-2008, 11:21 AM Re: Text size
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
It is NOT a good idea to use small, medium, large font sizing BECAUSE it is inconsistent across browsers. I always start by assigning the base font size for the document at 100.1% (takes care of rounding errors), then use percentages or em's for font sizing throughout. Default size of fonts for most browsers is 16px. 75% would be 12px etc. Just do the math.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-29-2008, 12:56 PM Re: Text size
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
Okay, thanks a lot LadynRed! So I would just have this in my css,
Code:
body {
    font-size: 100.1%;
}
Then add
Code:
<font size=75%>
or em throught the page to change font size? Thanks!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Old 03-29-2008, 04:00 PM Re: Text size
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Odha, you'd be better off with classes on the elements of your HTML, with font size set on those classes (when needed) in the CSS document. Don't put font sizes in the main body of your document.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-29-2008, 11:20 PM Re: Text size
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
Thanks! Will do.
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Reply     « Reply to Text size
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31728 seconds with 12 queries