ol-ext
ol-ext copied to clipboard
Control Bar Position Top
Hi,
I'm trying to place my control bar to the very top (~0.5em). However, even if configuring "top: 0em;" there is a bigger distance between the control bar and the top of the map. For me it seems, that - maybe - the zoom controls (+/-) cause the control bar to be placed after them.

Could someone give me a hint on how to place the control bar to the very top?
Thanks in advance
Just use CSS to style the control:
.ol-control.ol-bar.ol-top.ol-right {
top: 0;
}
This worked for me (at least for the browsers Firefox and Chrome on Windows). However, when accessing the page with Chrome on Android, the problem still seems to be there. Any ideas?

On smartphone (touch devices) buttons are bigger and thus position must be define.
Just add .ol-touch
class to the css:
.ol-touch .ol-control.ol-bar.ol-top.ol-right,
.ol-control.ol-bar.ol-top.ol-right {
top: 0;
}