Viewing 15 replies - 1 through 15 (of 15 total)
  • I’ve managed it with this but i’m not sure the syntax is quite right – it does work though and centres the map on the page (using the shortcode from the premium version)

    code on the page:
    <span class=”gmw-shortcode-widget”></span>

    [gmw id=”2″]

    CSS:
    .gmw-shortcode-widget {
    text-align:center;
    }

    If I put the shortcode between the <span> tags it doesn’t centre it. The line space between the <span> line and the shortcode is necessary

    Any advice welcome as I’m sure there must be a more elegant way to write the code ? ??
    Thanks

    Thread Starter cayo_azul

    (@cayo_azul)

    Im using the free version not premium so this wont work for me. Weird it does not center by default

    Plugin Author WebFactory

    (@webfactory)

    Hi,
    The widget is only as wide as the map is, so from the widget’s perspective, there’s nothing to center. This is a theme thing. What you wrote above is good and will work. There’s no other, more elegant way ?? You simply centered the content within the container.

    Thread Starter cayo_azul

    (@cayo_azul)

    Thanks for your reply. The thing is I am not using the Premium Version so I have no short code to work with. Just the widget area.

    Plugin Author WebFactory

    (@webfactory)

    You’re welcome.
    Yes and no. It is different but adding to code you noted above will still work with the setup you have at the moment.

    Thread Starter cayo_azul

    (@cayo_azul)

    OK I will try and then get back to you

    Plugin Author WebFactory

    (@webfactory)

    No problem. Reopen the ticket if necessary.

    Thread Starter cayo_azul

    (@cayo_azul)

    Hello again. I tried the code but no go. I tried to make the map wider but that doesn’t work either even though the theme is set to wide format.

    I think you are correct. Must be something with my theme

    Plugin Author WebFactory

    (@webfactory)

    For me, the map is centered on your site.

    Thread Starter cayo_azul

    (@cayo_azul)

    Actually I just got it to work.

    I used this code which I modified the .css and added to custom code section of the theme.

    .business-template .main-wrapper .widget {
    background-color: #ffffff;
    width: 500px;
    margin: 0 auto;
    }

    Now my only issue is I wish I could have it a bit wider. I am going to try for that but other than this I do have it centered now.

    Plugin Author WebFactory

    (@webfactory)

    It can’t be wider, it’s Google’s limitation.

    Thread Starter cayo_azul

    (@cayo_azul)

    Thanks for the info. I guess Im done then ??

    Plugin Author WebFactory

    (@webfactory)

    ?? glad to hear it.

    I’d appreciate if you can give us a positive review, it really helps a lot. Thanks! https://www.ads-software.com/support/view/plugin-reviews/google-maps-widget

    This CSS should do the trick to center the widget map regardless of size and widget version.

    #googlemapswidget-2 > p > a > img {
    margin-right: auto;
    margin-left: auto;
    }

    My theme has a custom css area but you should be able to add it to your theme css or possible the widgets css (although I didn’t try it). Hope it helps.

    Plugin Author WebFactory

    (@webfactory)

    Thank you for sharing!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Can map be centered?’ is closed to new replies.