I am facing this wierd situation with GWT where styles are not picked up from the CSS file correctly.
I am trying to style a text area. I know that it picks up default styles from either clean.css or standard.css.
But i have removed the inherit line from the application.gwt.xml file and copied all those styles into my own custom stylesheet file – application.css
And i am trying to add this style name (“close” see below) to my textarea like this
TextArea ta = new TextArea();
ta.addStylename("close");
But it is not picking up the class name “close” at all. I have the default styles for text area copied into application.css from standard.css.
I checked the page using firebug and chrome’s inspect element, i could see see the element as this –
<textarea class="gwt-TextArea close"></textarea>
I see styles only being picked up from class – gwt-TextArea.
could someone help me out here.
//// styles in application.css
.close {
font-size:150%;
}
.gwt-TextArea {
border: 1px solid #d9dbdb;
background: #ffffff;
color: #8e8e8e;
font: Arial, sans-serif;
overflow: auto;
}
Thanks guys for helping out. But I figured out that my css file had a syntax error somewhere in the middle of the file and hence all the styles written below that error were not picked up.
That was a tough thing .. because i was all the time wondering if I was doing anything wrong in the way I am handling styling through GWT.