File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -53,25 +53,29 @@ <h4>OpenLayers and Bootstrap</h4>
53
53
Note that the OpenLayers stylesheet is loaded before
54
54
Bootstrap. The Bootstrap CSS sets the maximum width for
55
55
images to be 100% (of their containing element).
56
+ </p>
56
57
<pre><code>img {
57
58
max-width: 100%;
58
59
}
59
60
</code></pre>
61
+ <p>
60
62
This causes problems for images that you might want to be
61
63
bigger than their containing element (e.g. big tile in small
62
64
map viewport). To overcome this, the OpenLayers CSS
63
65
overrides this <code>max-width</code> setting. If you are
64
66
not loading the OpenLayers default CSS or are having trouble
65
67
with tile sizing and Bootstrap, add the following to your
66
68
markup:
67
- <pre><code><style>
68
- max-width: none !important;
69
- </style><code></pre>
70
69
</p>
70
+ <pre><code><style>
71
+ img.olTileImage {
72
+ max-width: none;
73
+ }
74
+ </style></code></pre>
71
75
</div>
72
76
</div>
73
77
</div>
74
78
<script src="../lib/OpenLayers.js"></script>
75
79
<script src="bootstrap.js"></script>
76
80
</body>
77
- </html>
81
+ </html>
Original file line number Diff line number Diff line change @@ -485,5 +485,5 @@ a.olControlZoomOut {
485
485
486
486
/* override any max-width image settings (e.g. bootstrap.css) */
487
487
img.olTileImage {
488
- max-width: none !important ;
488
+ max-width: none;
489
489
}
You can’t perform that action at this time.
0 commit comments