Cannot change Label background colors on hover using css.

539 views
Skip to first unread message

David Lee

unread,
May 16, 2013, 8:59:02 PM5/16/13
to google-we...@googlegroups.com
So I set the style name of my GWT Label:

currentDataNameDescriptionLabel.setStyleName("NFRFP-Label NFRFP-ClickableLabel");

and I have this css:

.NFRFP-Label {
float: left;
  font-size: 17px;
  margin-right: 4px;
}

.NFRFP-ClickableLabel {
cursor: pointer;
}

.NFRFP-ClickableLabel: hover {
background-color: #EEEEEE;
}

And... no joy. When I use the Chrome Developer Plugin to edit the NFRFP-ClickableLabel class to be NFRFP-ClickableLabel:hover in a running page, well it works fine.

Any idea on how I can get the css hover selector to work with a GWT Label?

Cheers,
David


Andrei

unread,
May 17, 2013, 11:28:50 AM5/17/13
to google-we...@googlegroups.com
Try

background-color: #EEE !important;

If it works, it means some other style interferes with your .NFRFP-ClickableLabel class.
Reply all
Reply to author
Forward
0 new messages