Search code examples
cssopenlayersopenstreetmap

How to apply css with OpenStreetMap and OpenLayers


I'm trying to use OpenLayers with OpenStreetMap. My map is printed, ok, but I have the copyright line in the middle of the map. Why? I would like to have it at the bottom. Red color is applied but not bottom, why and how to do, please?

.olControlAttribution {
  position: absolute;
  bottom: 0em;
  color: red;
}
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<link rel="stylesheet" href="css/style.css" type="text/css">

<div id="OpenLayers_Control_Attribution_7" style="position: absolute; z-index: 1004;" class="olControlAttribution olControlNoSelect" unselectable="on">
  © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors
</div>


Solution

  • Thanks to Raul who helped me:)

    If my .olControlAttribution didn't worked, #OpenLayers_Control_Attribution_7 solved the solution.