I found a solution and wanted to share it in case anyone else needs
it.
I needed to change:
.georgeMenuItem .gwt-MenuItem-selected {
background: #c1272d;
color: #FFF200;
}
to
.georgeMenuItem-selected {
background: #c1272d;
color: #FFF200;
}
On May 22, 8:21 am, Tracy <[email protected]> wrote:
> Hi,
>
> I'm new to GWT and have been scouring the discussion groups and
> internet for an answer to my question but I have had no luck.
>
> Here is my question:
>
> I need to change the style on an individual menuitem on my menubar.
>
> I tried to remove the style for the menuitem and then add my new style
> it but only changed the the "georgeMenuItem" part of my css.
>
> Here is a snippet of my code
>
> MenuItem georgetownMenuItem = new MenuItem("Georgetown - Union
> Station", new Command() {
> public void execute() {
> RootPanel.get().remove(0);
> RootPanel.get().add(createPage(createGoButtonPanel
> (),assembleContent(createGeorgetownContent(), GEORGETOWN_TOP_IMG,
> "georgetownMainPanel")));
> // sideBar.setStyleName("adRatesSidePanel");
> //rightPanel.setStyleName("adRatesRightPanel");
> }
> });
>
> georgetownMenuItem.removeStyleName("gwt-MenuItem");
>
> georgetownMenuItem.setStyleName("georgeMenuItem");
>
> toGo.addItem(georgetownMenuItem);
>
> ******************************************************************
>
> CSS
> .georgeMenuItem {
> cursor: default;
> border: 1px solid #FFF200;
> background-color: #FFFFFF;
> color: #FFF200;
>
> }
>
> .georgeMenuItem .gwt-MenuItem {
> cursor: default;
> height: 33px;
> width: 95px;
> font-size: 12px;
> background-color: #FFFFFF;
> color: #FFF200;
> font-family: helvetica, impact, sans-serif;
> text-align: left;
> vertical-align: center;
> padding-left: 10px;}
>
> .georgeMenuItem table {
> margin: 0px;
> border-collapse: collapse;
> border-spacing: 0px;
>
> }
>
> .georgeMenuItem .gwt-MenuItem-selected {
> background: #c1272d;
> color: #FFF200;
>
> }
>
> Any help would be appreciated.
>
> Thank you,
>
> Tracy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---