Hi, I did some changes a while ago with the following style definition because I had too long layer names. I didn't have to mess up with the hardcode. Am I not understanding the question?
.olControlLayerSwitcher { font-size: x-small !important; padding-right: 50px !important; } - mika - Andreas Hocevar kirjoitti: > P Kishor wrote: > >> is there a way to change the fonts in the layerswitcher control short >> of fiddling with the hard coded styles in LayerSwitcher.js >> loadContents method? >> >> > > Unfortulately not. But patches to move these style definitions to css > are more than welcome. One hint though: the LayerSwitcher control is > intended for a simple way to control layers, and is not very > configurable. If you need functionality beyond that, you may want to > have a look at one of the libraries that build upon OpenLayers and > provide richer UI components (e.g. http://geoext.org). > > Regards, > Andreas. > > >> loadContents: function() { >> >> //configure main div >> this.div.style.position = "absolute"; >> this.div.style.top = "25px"; >> this.div.style.right = "0px"; >> this.div.style.left = ""; >> this.div.style.fontFamily = "sans-serif"; >> this.div.style.fontWeight = "bold"; >> this.div.style.marginTop = "3px"; >> this.div.style.marginLeft = "3px"; >> this.div.style.marginBottom = "3px"; >> this.div.style.fontSize = "smaller"; >> this.div.style.color = "white"; >> this.div.style.backgroundColor = "transparent"; >> >> >> >> >> >> >> > > > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users