frankyro
7 Jul 2009, 10:04 PM
GXT 2.0
Browser: Firefox
The Style for the Button doesn't work.
Here is the Code :
import com.extjs.gxt.ui.client.widget.button.Button;
// import com.google.gwt.user.client.ui.Button;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Test implements EntryPoint {
public void onModuleLoad() {
Button bTest=new Button("Test");
bTest.setStyleName("myButton");
RootPanel.get("inhalt").add(bTest);
}
}and the CSS:
.myButton {
background-image: none;
background-color: white;
color : black;
border : none;
}
.myButton:hover {
background-image: none;
border:none;
}
Analysation with fireBug
<table id="x-auto-0" class="x-btn mybutton x-btn-noicon" cellspacing="0" role="presentation" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left">
<tr>
</tr>
<tr>
<td class="x-btn-ml">
</td>
<td class="x-btn-mc">
<em class="" unselectable="on">
<button class="x-btn-text" type="button" tabindex="0" style="position: relative;">Test</button>
</em>
</td>
<td class="x-btn-mr">
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
The Style is in the Table-Tag, I expected in in the Button-Tag
Is this a Bug or did i make a mistake ?
Browser: Firefox
The Style for the Button doesn't work.
Here is the Code :
import com.extjs.gxt.ui.client.widget.button.Button;
// import com.google.gwt.user.client.ui.Button;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Test implements EntryPoint {
public void onModuleLoad() {
Button bTest=new Button("Test");
bTest.setStyleName("myButton");
RootPanel.get("inhalt").add(bTest);
}
}and the CSS:
.myButton {
background-image: none;
background-color: white;
color : black;
border : none;
}
.myButton:hover {
background-image: none;
border:none;
}
Analysation with fireBug
<table id="x-auto-0" class="x-btn mybutton x-btn-noicon" cellspacing="0" role="presentation" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left">
<tr>
</tr>
<tr>
<td class="x-btn-ml">
</td>
<td class="x-btn-mc">
<em class="" unselectable="on">
<button class="x-btn-text" type="button" tabindex="0" style="position: relative;">Test</button>
</em>
</td>
<td class="x-btn-mr">
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
The Style is in the Table-Tag, I expected in in the Button-Tag
Is this a Bug or did i make a mistake ?