|
| |
|
|
Avick
Posts: 181 From: Ireland Status: offline
|
Equal size fonts. - 6/24/2005 10:31:01
This might seem like a simple question but give it a try. You will most likely end up frustrated like me. I am trying to create a default font (Size Type Colour) in a simple command. As I move through my site I will increase the font or decrease it as required. I wanted to do this in a simple single line of CSS. This is the problem so far. (Mostly tested in FireFox)
Body {Font: 80% Arial Gray} will not work in tables
Body, Table {Font: 80% Arial Gray} will not work in Tables and Paragraphs
Body, td, p {Font: 80% Arial Gray} font is different sizes in body and td
I would like to set things up that the font stays the same throughout the site. Then If I want to make a font smaller in a footer DIV I can set it so: div.footer {font-size: 70% …… } This , hopefully, will change the font in the DIV but not the rest of the site. Am I shooting in the dark with this one or would I be better to set all commands in required sections!!
_____________________________
Alan http://www.newebirl.net
|
|
|
|
Tailslide
Posts: 6267 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Equal size fonts. - 6/24/2005 11:03:30
Hi Alan The standard thing to do would be:
body {font: 76% Verdana, Arial, Helvetica, sans-serif; color: #666;} And then specify divs or tds separately:
#footer {font-size: 1em;} There's lots of debate about the best way to size fonts in websites - not sure if there's any clear winner on that argument yet!
< Message edited by Tailslide -- 6/24/2005 11:16:06 >
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Avick
Posts: 181 From: Ireland Status: offline
|
RE: Equal size fonts. - 6/24/2005 11:37:25
Tried this Tailslide Everything in a table will apper larger then outside the table. If I place a div box in the table and one outside, the one inside has larger text then the others!!!
_____________________________
Alan http://www.newebirl.net
|
|
|
|
Tailslide
Posts: 6267 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Equal size fonts. - 6/24/2005 11:45:52
Are you using tables for layout? Can you then give a specific fontsize just to the div that's inside the table cell to bring the font-size down. i.e. #tablediv {font-size:60%;}
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Tailslide
Posts: 6267 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Equal size fonts. - 6/24/2005 16:20:53
It does. Do you have more divs within the table and have you tried to apply a font-size to those inner divs specifically - i.e. CSS: #leftdiv {font-size: 1em; color: #666;}
#rightdiv {font-size: .9em; color: #ccc;} HTML: <table>
<tr>
<td><div id="leftdiv"> Content goes here</div></td>
<td><div id="rightdiv"> More content goes here</div></td>
</tr>
</table> Just an example.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: Equal size fonts. - 6/24/2005 20:25:31
quote:
By doing it this way I get to keep the code clean without a ton of font-size tags. Try this: body {font: 80% arial; color:gray;}
p, td {font-size: 1em;} Note that a font color cannot be included in font property declaration - it is not valid. You must declare it separately.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: Equal size fonts. - 7/6/2005 15:33:46
Actually the best way to do this is: body, html { font-size: 100.01%; color: gray; } Then in any of the spots that you wish to change your font & color, you use ems, the reason for the 100.01%, but I have to go and look it up. You can find it on the css-d wiki list if you do a search for the sizing of the font. Reason for using body, and html is because Explorer doesn't look at html as being the root of the document. So using both html and body takes care of this for you.
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://directory.css-styling.com http://fmsforum.com http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|