gemzilla
08-07-2013, 01:26 PM
I have been using CSS for a little while now and all of a sudden when I preview my websites in browsers on any machine the font I have chosen in the CSS style sheet gets over written by the users default browser settings. Is there something I need to add to stop it from doing that or is their no way. Below are a few of my websites so you can possibly see what I mean and have access to the style sheet.
http://www.kent-telephones.ismywebsite.co.uk/
http://chd.ismywebsite.co.uk/
Thank you
Gemzilla
jscheuer1
08-07-2013, 02:49 PM
You possibly switched your pages from quirks mode to standards mode by adding a standards invoking DOCTYPE, or changed the css. In any case, this is incomplete and will be ignored (from kent-telephones.ismywebsite.co.uk/CSS/menu.css line #72):
font:Arial, Helvetica, sans-serif;
It should be:
font-family:Arial, Helvetica, sans-serif;
You can use just font (which is a combo property, like border or margin, both of which have component properties that can be set separately), but then you have to specify at least the weight, often the size and always the family, in that order, space separated on one line (other font properties can also be included, if done so in their respective order*:
font: 700 16px Arial, Helvetica, sans-serif;
Given your current setup, it's easiest to just use font-family because you already have defined those other things separately, which is also OK to do.
Your other font problems on this and/or other pages are probably similar, if not, let me know:
The browser cache may need to be cleared and/or the page refreshed to see changes.
*See:
http://www.blooberry.com/indexdot/css/properties/font/font.htm
or your favorite css reference for the proper order and syntax when using the combo font property.
gemzilla
08-07-2013, 04:05 PM
Oh that's better, that's just me being lazy and typing font instead of font-family.. I never actually new the difference and now I do LOL.
Thank you John
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.