Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why jquery's ui.css files's font-sizes are bigger than normal?

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

like image 400
mehmet6parmak Avatar asked Mar 03 '10 16:03

mehmet6parmak


People also ask

How do you scale text in HTML?

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.

What is font-size-adjust?

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.

How do I double font size in CSS?

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.


2 Answers

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.

like image 184
marc.d Avatar answered Oct 25 '22 19:10

marc.d


I usually set the class ui-widget in my css like this

.ui-widget {
    font-size:80%;
}
like image 30
Paul Lernmark Avatar answered Oct 25 '22 19:10

Paul Lernmark