[OpenLayers-Users] Positioning the lat/long mouseposition display.

Christopher Schmidt crschmidt at metacarta.com
Mon Sep 21 10:50:39 EDT 2009


On Mon, Sep 21, 2009 at 03:20:28AM -0700, regioGIS wrote:
> 
> Hi,
> 
> I tried this, not by modifying the style.css file, but by adding css tag
> like this :
> 
> <style type="text/css">
>    .olControlAttribution {
>     	  left: 3px; 
>     	  bottom: 5px;
>     	  color: blue;
> 		}
>    .olControlMousePosition {
>     	  bottom: 5px;
>     	  color: blue;
> 		}
> </style>
> 
> All properties are taken into account ( left,right,color so far ) but not
> the 'bottom' property ! It stubornly stays with the values defined in the
> default style.css file .... (being 0em for mouseposition, and 4.5em for
> attribution ). Why is this ?

"If you care to modify the style of any OpenLayers element, include the
default stylesheet as a link and declare any style modifications below
that link. These style declarations can be in other linked stylesheets
or in style tags. In addition, construct your map with options that
include {theme: null}. This will disable the default method of loading
the stylesheet and allow you to declare style rules in your own linked
stylesheets or style tags."

-- http://openlayers.org/dev/examples/custom-style.html

Did you do that?

-- Chris

> Cheers,
>  
> 
> 
> cgp wrote:
> > 
> > The displayClass of the lon/lat mouse position is
> > "olControlMousePosition", so if you go to style.css (which should've been
> > included in the .zip file) you can just change the "bottom" property to
> > any value that fits your needs.
> > 
> 
> -- 
> View this message in context: http://n2.nabble.com/Positioning-the-lat-long-mouseposition-display-tp3616554p3684307.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list