Keeping the fonts straight between...

User 404575 Photo


Registered User
887 posts

http://www.ColoradoProcessServers.net

I designed this to use Arial font throughout and it looks nice to me in Seamonkey and Internet Explorer.

Then I just tried Firefox and it renders in something that looks like Times New Roman.

What did I do wrong?

Melissa Rhiannon
OS Windows 10
User 1948478 Photo


Senior Advisor
1,850 posts

Melissa,
When a font (-family) is not specified in the CSS, the browsers will use their respective default fonts, which will vary for different browsers.

An example from your case:
The styles for your <h2> and <h4> tags are first defined as follows:

h1{font-size:18px;color:#0000be;text-align:center;font:Arial;}
h2{font-size:30px;color:#0000be;text-align:center;font:Arial;}

But later, you have the following:

#wrapper table #header #information h2{font-size:18px;vertical-align:top;top:0px;padding-top:0;font-style:italic;font-weight:bold;}
#wrapper table #header #information h4{font-size:14px;font-style:italic;font-weight:bold;text-align:center;}

The later declarations do not specify a font. They are also more specific, so they will override the initial declarations. Consequently, the fonts for <h2> and <h4> in #wrapper table #header #information will be the browser defaults.
User 1948478 Photo


Senior Advisor
1,850 posts

It seems I was a bit sloppy in my copy/paste in the previous post. The first two lines of CSS declarations that I quote:

h1{font-size:18px;color:#0000be;text-align:center;font:Arial;}
h2{font-size:30px;color:#0000be;text-align:center;font:Arial;}

should instead be:

h2{font-size:30px;color:#0000be;text-align:center;font:Arial;}
h4{font-size:14px;color:#0000be;text-align:center;font:Arial;}

Conclusions would be the same...
User 1948478 Photo


Senior Advisor
1,850 posts

Melissa,

I tested the suggestions in my previous posts, - and found that everything still looked like Times New Roman (IE9 and Chrome included)... So you can scratch those posts! :(

However, I finally got the Arial font to appear by replacing "font:Arial;" with "font-family: arial, sans-serif;"

I am not sure what's going on here, since I thought the "font:Arial;" declaration should have worked.
(My CSS-knowlege clearly has some glaring gaps...! :D )
User 539803 Photo


Registered User
2,156 posts

In earlier posts you said you were using VSD but i cant see that in your page source

If you are switching between two programs, wordpress etc that could cause all sorts of issues.

I think (not my area as i dont use it) html editor has similar issues when switching between editors, the guide says use either wysiwyg or html not to switch back and forth
Started using CC VSD in January 2009, I don't do HTML code, Sales from CC site exceeding expectations taken me out of semi-retirement
Hosted FREE on CC S DRIVE www.chauffeurdrivenluxurycars.co.uk
My new VSD & SCCP site Oct 2011 www.deloreanjewellery.co.uk
My friendly window cleaner www.mwcwindowcleaner.co.uk

User 122279 Photo


Senior Advisor
14,649 posts
Online Now

Viv:; I think she has gone back to WP eventually.

Melissa; I noticed the same as Per. the rule "font:Arial;" makes your css not validate, but if you change it the way Per suggested, it will.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 404575 Photo


Registered User
887 posts

Viv @ Jewelcraft wrote:
In earlier posts you said you were using VSD but i cant see that in your page source

If you are switching between two programs, wordpress etc that could cause all sorts of issues.

I think (not my area as i dont use it) html editor has similar issues when switching between editors, the guide says use either wysiwyg or html not to switch back and forth


No I'm not switching, this site has been in Wordpress since the guy designed it for me last spring.

http://www.PlanetaryBillOfRights.org/ is in VSD.

I was thinking of redoing the http://www.ColoradoProcessServers.net site in VSD but couldn't get all the features converted over. VSD just cant handle what I have there.
Melissa Rhiannon
OS Windows 10
User 404575 Photo


Registered User
887 posts

Per wrote:
Melissa,

I tested the suggestions in my previous posts, - and found that everything still looked like Times New Roman (IE9 and Chrome included)... So you can scratch those posts! :(

However, I finally got the Arial font to appear by replacing "font:Arial;" with "font-family: arial, sans-serif;"

I am not sure what's going on here, since I thought the "font:Arial;" declaration should have worked.
(My CSS-knowlege clearly has some glaring gaps...! :D )


Arial is by nature sans serif, so isn't sans serif redundant?
Melissa Rhiannon
OS Windows 10
User 404575 Photo


Registered User
887 posts

Per wrote:
Melissa,

I tested the suggestions in my previous posts, - and found that everything still looked like Times New Roman (IE9 and Chrome included)... So you can scratch those posts! :(

However, I finally got the Arial font to appear by replacing "font:Arial;" with "font-family: arial, sans-serif;"

I am not sure what's going on here, since I thought the "font:Arial;" declaration should have worked.
(My CSS-knowlege clearly has some glaring gaps...! :D )


Think I got it all. The navbar menu was the last holdout in Firefox. How's it all look now?

Thanks!
Melissa Rhiannon
OS Windows 10
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

It looks good now that you have got less white space.

BTW, Sans-serif is not redundant in connection with Arial. There are computers out there that might not have the Arial font, so then your site will be displayed with the nearest sans-serif font that they have installed.
Arial is pretty much default on Windows systems, but not necessarily on Linux, BeOs, Mac and whatever else there is out there. So the font-family will be sans-serif, and those machines that have Arial will display that.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.