Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML, CSS..: different font size in buttons and selects than for plain text (at least in FF)

I have this rule:

body {

    font-family: Arial,Helvetica,sans-serif;
    font-size: 12px
}

but i have different font size for the selects and the buttons then for plain text.

What should i do if i want the same size for everything?

Regards

Javi

like image 468
ziiweb Avatar asked Jun 07 '10 12:06

ziiweb


People also ask

How do I change the size of text in a button in CSS?

To change the font size of a button, use the font-size property.

How do I automatically adjust font size in CSS?

The font-size-adjust property of CSS tells the browser to adjust the font size of the text to the same size regardless of font family. When the first chosen font is not available, the font-size-adjust property allows you more control over the font size.

What is the font size in CSS called what selector?

The font-size property sets the size of a font.


2 Answers

formular elements usualy don't inherit those properties, so you have to do:

body{
    font-family: Arial,Helvetica,sans-serif;
    font-size: 12px;
}
input, select, button{
    font-family: inherit;
    font-size: inherit;
}
like image 125
oezi Avatar answered Oct 08 '22 22:10

oezi


body,
input,
select,
button {
  font-family: Arial,Helvetica,sans-serif;
  font-size: 12px;
}
like image 35
Gert Grenander Avatar answered Oct 08 '22 23:10

Gert Grenander