diff --git a/examples/bootstrap.html b/examples/bootstrap.html index 7cb8a98be5..7f3b78b3e6 100644 --- a/examples/bootstrap.html +++ b/examples/bootstrap.html @@ -53,10 +53,12 @@ Note that the OpenLayers stylesheet is loaded before Bootstrap. The Bootstrap CSS sets the maximum width for images to be 100% (of their containing element). +

img {
     max-width: 100%;
 }
 
+

This causes problems for images that you might want to be bigger than their containing element (e.g. big tile in small map viewport). To overcome this, the OpenLayers CSS @@ -64,14 +66,16 @@ not loading the OpenLayers default CSS or are having trouble with tile sizing and Bootstrap, add the following to your markup: -

<style>
-    max-width: none !important;
-</style>

+
<style>
+    img.olTileImage {
+        max-width: none;
+    }
+</style>
- \ No newline at end of file + diff --git a/theme/default/style.css b/theme/default/style.css index a681a9f269..3e77544c28 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -485,5 +485,5 @@ a.olControlZoomOut { /* override any max-width image settings (e.g. bootstrap.css) */ img.olTileImage { - max-width: none !important; + max-width: none; }