Hi You need to add this to your button I guess
displayClass: "olControlButton" Cheers Kris -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Henry Rotzoll Sent: Thursday, January 07, 2010 3:43 PM To: [email protected] Subject: [OpenLayers-Users] Button Active CSS Styling Hi there, I have a problem with a custom button, that I've added to the map. Here is the code for that: var btn = new $wnd.OpenLayers.Control.Button ({trigger: myTrigger, title: 'Enable or Disable the Area of Interest Selection'}); panel.addControls(btn); map.addControl(panel); Now here is the CSS code that I use to style the button: .olControlPanel .olControlButtonItemActive { width: 24px; height: 22px; background-color: blue; background-image: url("http://www.openlayers.org/dev/theme/default/img/draw_polygon_on.png "); background-repeat: no-repeat; } .olControlPanel .olControlButtonItemInactive { width: 24px; height: 22px; background-color: orange; background-image: url("http://www.openlayers.org/dev/theme/default/img/draw_polygon_off.pn g"); background-repeat: no-repeat; } The problem is that the inactive button style is shown, i. e. the graphic is loaded, but the active graphic is never retrieved from the server. I've added also some default buttons like Zoom Box with the same method. Here everything works fine. Does anybody have an idea? Many thanks in advance. Best regards, Henry -- View this message in context: http://n2.nabble.com/Button-Active-CSS-Styling-tp4266755p4266755.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
