Avoid !important when not needed.

This css selector is sufficient to override bootstrap’s one.
This commit is contained in:
Antoine Abt
2012-11-23 14:46:45 +01:00
parent 1d3eb0e60c
commit 862a53ddaf
2 changed files with 9 additions and 5 deletions

View File

@@ -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).
</p>
<pre><code>img {
max-width: 100%;
}
</code></pre>
<p>
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:
<pre><code>&lt;style>
max-width: none !important;
&lt;/style><code></pre>
</p>
<pre><code>&lt;style>
img.olTileImage {
max-width: none;
}
&lt;/style></code></pre>
</div>
</div>
</div>
<script src="../lib/OpenLayers.js"></script>
<script src="bootstrap.js"></script>
</body>
</html>
</html>