Announcement

#1 2024-01-11 19:27:46

kinmen
Member
2018-12-17
43

openstreetmap main map size

Greetings,

I wonder if it is possible to set a custom width for the main map, the one at  the top in the home page: i find difficult to scroll the page, especially with smaller screens, by moving the cursor on the scrolling bar which is very close to the map image, right side of the browser's page. It would be nice to be able to set a "%" width, so that the map doesn't reach exactly the border of the web page and can leave some more space to scroll it.
What do you think?

Offline

 

#2 2024-01-11 22:03:43

Katryne
Member
2016-12-03
372

Re: openstreetmap main map size

Kinmen, here what I tried first : (in Local Files Editor, css tab, template is Bootstrap)

#osmmap {max-width:90%;margin:0 auto;}
and that did the job.You could try a different width, playing with the 90 %

Then I wanted also a kind of frame, and shadows and below is what I have :
#osmmap {
box-shadow: 5px 5px 20px #14153a;
border-color: rgb(255, 207, 9);
border-style: solid;
border-width: 0;
display: block;
padding:1%;
margin:1rem auto;
text-align:center;
}

Look here (my map is nearly at bottom, not on top) : https://album.chauvigne.info/

Last edited by Katryne (2024-01-11 22:05:00)


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#3 2024-01-12 12:13:47

kinmen
Member
2018-12-17
43

Re: openstreetmap main map size

Thank you for sharing. Btw the css element is called #map, not #openstreetmap, is it? I added another style to your snippet, to center the map, so that it looks like:

#map {
    height: 500px;
    width: 90%;
    display: block;
    margin: 0 auto;
   
   
}


Nice Piwigo gallery btw ;)
K.

Offline

 

#4 2024-01-12 12:40:50

Katryne
Member
2016-12-03
372

Re: openstreetmap main map size

Sorry : it's because I use Openstreet map plugin, not Google.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#5 2024-01-18 12:37:19

kinmen
Member
2018-12-17
43

Re: openstreetmap main map size

me too, but couldn't find #openstreetmap element, just #map

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact