How I solved font-size problem in new 1.5 CSS

1 view
Skip to first unread message

Danny

unread,
Oct 15, 2008, 12:44:02 PM10/15/08
to Google Web Toolkit
I noticed that my font sizes did not respond to style sheet changes in
GWT 1.5.2. My solution is to place the following entry in my style
sheet:

table td, select {
font-size: inherit;
}

My explanation follows.

----------------------------------------------------

I divide up my GWT home page into sections by using the CSS <div>
like:

<div id = "page section name"></div>

This permits me, for example, to locate my menu column by :

<div id="menu_column"></div>

and to place it on the page in my code by:

RootPanel.get("menu_column").add(menuColumnVP);

My style sheet entry for the menu_column id contains:

#menu_column{
font-size: x-small:
}

This stopped working in GWT 1.5.2, because the standard.css style
sheet loaded by:

<inherits name='com.google.gwt.user.theme.standard.Standard'/>

contains the following entry:

body, table td, select {
font-family: Arial Unicode MS, Arial, sans-serif;
font-size: small;
}

This means that the font-size for everything in my menuColumnVP above
will be small, not x-small as specified my menu_column id
specification, because the contents of menuColumnVP will be inside
some table td, overriding my specification. Hence the "inherit"
solution.
Reply all
Reply to author
Forward
0 new messages