Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

body { font-size: ; font-family: }

Reply with quote I'm using a linked style sheet and can't make the font-size & family work... This should be simple coding, and it probably is, but I'm tearing my hair out because it's just not working! Does anyone know of any wierd bugs/imcompatibilities with Mozilla1.6/FireFox0.8..?

Thanks
Rich Rolling Eyes
Reply with quote Not really; font : normal 100% arial, verdana, helvetica, sans-serif;

};-) http://www.xhtmlcoder.com/

WVYFC chose the Yorkshire Air Ambulance as the main charity to fund raise for in 2006
Reply with quote Welcome to he forum Rich

What is the line of code you are using?

Cheers

Mike Abbott
Accessible to everyone
Reply with quote The line of code is:

body {
font-family: verdana;
font-size: 10px;
color: black;
background-color: #6BC3E7;
}

The text displays in Verdana, but no matter what size variable I enter, it stays on 12px...

Rich
Reply with quote You must have something else wrong with your page; that CSS is correct although you are advised to offer a generic family but that shouldn't effect the size.

};-) http://www.xhtmlcoder.com/

WVYFC chose the Yorkshire Air Ambulance as the main charity to fund raise for in 2006
Reply with quote Are you sure that you don't have a problem with the cascade?

Is there a font-size setting somewhere that is more specific that the one for <body>, that might override it?

As Robert said, you should always include at least a generic font family, in case the font you specify isn't installed on a user's machine. For example:
Code:
font-family: Verdana, sans-serif;

Tommy has left the building
Reply with quote I would also recommend using a variable not fixed font size to help those who wish to view in larger font sizes, use em or %.

As Tommy says, have you specified any other font sizes in your coding Question I have found that if you miss a " it will affect the following code so check to see if your code is complete.

We'll get to the bottom of this or my name is not Miss Marple

Mike Abbott
Accessible to everyone
Reply with quote I'll have to take it apart to see if there's anything over-riding the body tag. Thanks for the input - I'll be back.
Reply with quote If you have access to Mozilla, you can use the DOM Inspector to see all the CSS rules (including the browser's default style sheet) that affect a particular element. Very useful in cases like this.

Tommy has left the building
Reply with quote Sorted it - now using:

body, table {
font: normal 80% verdana, arial, helvetica, sans-serif;
color: black;
background-color: #6BC3E7;
}

Had to add 'table' to the boy rule for it to work though...

Cheers for the help
Rich
Reply with quote Internet Explorer?

If I recall correctly, IE doesn't support the correct inheritance of font properties into tables.

Tommy has left the building
Reply with quote I'm using Mozilla / FireFox - it's for an Intranet site, so I know that everyone using it will be on either of these 2.
Reply with quote Comrade

IE6 in standards mode seems cool with text sizes in tables, but IE5 and IE.5 often need font styles and sizes set on something like...

tr, td
{ styles }

Stuff I do
******************************
Design: http://www.stuffandnonsense.co.uk
My book: http://www.transcendingcss.com/
Reply with quote Also - because of what I've done with the sidebar menu, IE breaks it - and I'm not wasting my time making it work in IE - people will just have to get used to the idea that there's better browsers to be used..!
Reply with quote Comrade

If you wanna bash IE users, try a polite, standards based message.

HTML

<p id="BrowserWarning">
If you are seeing this message, it is likely that you are using a version of Internet Explorer. All content will be accessible and the site will look great! Just not as great as if you use a modern browser like <a href="http://www.mozilla.org/products/firefox/">Mozilla Firefox</a>.
</p>

CSS

p[id="BrowserWarning"] { display : none; }

Stuff I do
******************************
Design: http://www.stuffandnonsense.co.uk
My book: http://www.transcendingcss.com/

Display posts from previous:   

Page 1 of 2

Goto page 1, 2  Next

All times are GMT

  • Reply to topic
  • Post new topic