I have a page where I combine labels, input boxes and text areas to display some content. I would like all of them to have the same font-family and font-size. I have played with the font-family: inherit style but this doesn't seem to work for the input and text areas. What would be the easiest way to ensure the same font / size over the whole page.
views:
236answers:
3
+1
A:
My CSS is iffy as I haven't used it in some time, but I believe doing
*
{
font-family: arial;
}
will apply to all.
PhoenixRedeemer
2008-12-18 23:12:38
Nope .. the font in input box-es doesn't change.
Drejc
2008-12-18 23:17:28
Something must be overriding it then later. I just tried it on a web-page that was bare except for that style and an input and it resized it.
PhoenixRedeemer
2008-12-18 23:26:06
Can be ... my page is really complex in design and style.
Drejc
2008-12-18 23:31:24
I will mark this as correct, as it helped solving the problem. Thanks!
Drejc
2008-12-19 07:04:54
+1
A:
Ok ... this does the trick:
*
{
font-family: arial;
}
input
{
font-family: inherit;
font-size: 100%
}
textarea
{
font-family: inherit;
font-size: 100%
}
Drejc
2008-12-18 23:21:06
A:
I think most CSS devs will do something like
body {font: normal 10pt Arial}
At the top of the CSS file.
If you want to change labels from this, just add a
label, input, textarea {font-family:Georgia}
somewhere down the road.
Triptych
2008-12-18 23:21:50