• Resolved dwheditor

    (@dwheditor)


    Hi there,

    I’ve tried to check out and change this via css but am having no luck. The first image in my widget sidebar is great but after that all the ads are aligned to the left on mobile devices. Works perfect on larger devices it’s just the smaller devices that it is happening on. Any help would be really apricated, thank you.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Arnan de Gans

    (@adegans)

    Probably your theme adding paddings to images. Some responsive themes force a certain width for smaller screens for example.

    Did you place the ads individually or as a group/block?

    Thread Starter dwheditor

    (@dwheditor)

    Hmm yes i thought that too, but it was strange that the first one was perfectly aligned. They are placed individually so I can track them correctly.

    Plugin Author Arnan de Gans

    (@adegans)

    On the page you linked it seems to work now. All 20 or so ads line up under each other without weird paddings or margins.

    Perhaps just a browser cache that needed to refresh? Or what did you change?

    Thread Starter dwheditor

    (@dwheditor)

    Oh really? Thats not showing on my end on both the cached and private browsers. Margan’s ad is the only one centered and the others are all aligned to the left. Screenshots are below;

    https://ibb.co/H2mfRjN

    https://ibb.co/w6s1LN9

    Plugin Author Arnan de Gans

    (@adegans)

    Right, but this is what I see (See link) In Safari and Firefox.
    https://cloud.ajdg.net/s/dbQGtAMqTEsGmRT

    So if it’s misaligned for you, and not for me, this kind of supports the browser caching idea.
    Otherwise, align all adverts left as is default, and apply your own CSS to the group wrapper of your ad groups to align the ads the way you want.

    Thread Starter dwheditor

    (@dwheditor)

    Oh right, thats so strange that is showing right for you and not for me even after clearing cache and viewing in a private browser, thanks for sharing that.

    As they are placed in my sidebar as a widget in single ads (only three are in groups) would you know the CSS please to apply the center alignment as I cant seem to find that in the single ad settings.

    Thanks again for all your help.

    Plugin Author Arnan de Gans

    (@adegans)

    Every group is a <div> and has the CSS class .g and it’s own unique class .g-N
    Where N is the group ID. So .g-12 for group 12.

    Using that you can usually apply a centering margin to the groups you need to center them as described here: https://www.w3.org/Style/Examples/007/center.en.html#block

    Some themes override that though and use their own method, most good themes have a manual for centering things with a shortcode for example (or actual HTML) which you can then borrow their CSS bits and bops from.

    Thread Starter dwheditor

    (@dwheditor)

    Great thank you! But these are not in groups they are just placed in single widgets.. what would you recommended please to override the wrong padding issue please? Its so strange that one is right and the rest are not.

    Plugin Author Arnan de Gans

    (@adegans)

    That works the same way but with the a class. If you look at the previous post, replace the g with a to get the same function.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Images not aligned’ is closed to new replies.