/    Sign up×
Community /Pin to ProfileBookmark

Just wondering (in my ignorance) – when I do my CSS i set up a body font, but I find that when I’m defining input’s, or textareas etc I have to redefine that font. Then, if i later decide to change the body font, i’ve got to go through and change it for all of them. Is there a way I can set these elements to use the default font, so that when I change that it changes it everywhere?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@VladdyMar 23.2004 — Form elements do not inherit fonts by default. You can change this behaviour in compliant browsers with a simple line:

input, select, textarea

{ font-family: inherit;

}

However the damn IE does not recognize the inherit option. So to make a single font declaration for all browsers and all elementsuse:

body, input, select, textarea

{ font-family: Tahoma, Arial, sans-serif;

}
×

Success!

Help @jpmoriarty spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...