[OpenLayers-Users] Changing the width of the LayerSwitcher?

Andreas Hocevar ahocevar at opengeo.org
Mon Feb 22 11:18:20 EST 2010


Robert Hicks wrote:
> Hey all, is there an easy way to do this? I tried the plain old CSS
> approach by referencing the class name(s):
> 
>             div.olControlLayerSwitcher {
>             	width: 250px;
>             }
>             div.olControlNoSelect {
>             	width: 250px;
>             }
> 
> But no luck. I also tried maximizeDiv:true in the objects constructor
> but no changes. Ideas?

The above (for .olControlLayerSwitcher) should work if you are using the 
current trunk version, and include theme/default/style.css before the 
above declarations. If you are still using OpenLayers 2.8, you can try 
to make the width declaration of .olControlLayerSwitcher !important.

Regards,
Andreas.

> 


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list