Can you change font size, like you can change Font Family?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Can you change font size, like you can change Font Family?

Post by simonmlewis »

Code: Select all

#navigation #topNavRev2 
{
margin: 0; padding: 0; list-style: none; height: 40px; line-height: 40px;
font-family: impact, arial;
}
Some browsers like Safari cannot see Impact. So my CSS defaults to Arial. Problem there, is that the 'tabs' the links are in, do not adjust accordingly.

So, like you can set font-family, to be Impact [or] Arial [or] whatever/...... can you do this with font size.
So if there are 2 fonts in the list, I give two font sizes.

OR.... is there a way in the CSS file, to show one font if the browser is NOT Safari, and another font if it is?
Instead of having to do multiple CSS files. (where one could easily be missed in an update during development.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Can you change font size, like you can change Font Famil

Post by s.dot »

They should adjust accordingly. Add a comma in your stylesheet, like this.

[text]#navigation, #topNavRev2[/text]

That should fix that problem. The browser will display according to the order you have. If not the first one, then the second one, if not the second one, then the third one, and so on.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Can you change font size, like you can change Font Famil

Post by simonmlewis »

Sorry....? Don't understand.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Can you change font size, like you can change Font Famil

Post by social_experiment »

Code: Select all

#navigation, #topNavRev2
the comma applies the styling to both id navigation and topNavRev2

Code: Select all

#navigation #topNavRev2
this is incorrect syntax within the stylesheet, probably why the styling doesn't work
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply