Im looking at jqueries tabs, datepicker etc and see that font-sizes of the classes added to elements are like 1.1em, 1em which seems big in the page. Why did they do this like that? What is the purpose? http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery.ui.theme.css
In HTML, you can change the size of text with the <font> tag using the size attribute. The size attribute specifies how large a font will be displayed in either relative or absolute terms. Close the <font> tag with </font> to return to a normal text size.
The font-size-adjust property gives you better control of the font size when the first selected font is not available. When a font is not available, the browser uses the second specified font. This could result in a big change for the font size. To prevent this, use the font-size-adjust property.
Set Font Size Using ems Another common way of setting the size of a font in CSS is to use em sizes. The em unit of measurement refers to the font size of a parent element. If you set a font's size to 2em , the font size will be twice that of the parent element.
em is a relativ size and depends on the next fixed font-size up the dom tree. when there is no fixed font-size it defaults to 16px.
so when you change your own css like this
body {
font-size: 12px;
}
1em means 12px, 2em means 24px and so on.
I usually set the class ui-widget in my css like this
.ui-widget {
font-size:80%;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With