• Resolved mikecomp

    (@mikecomp)


    My website is

    https://www.geminithermohvac.com/residential-hvac-technician/

    In the sidebar text widget I have added an image, a contact form, and a google map. I want these all to be centered in the sidebar. Right now only the map is centered while the image and contact form are left aligned. I have tried adding various codes to my child theme but no luck. I have temporarily widened the sidebar so that the problem is visible when viewing on a computer. The sidebar will normally be the same width as the image so on the computer this issue would not be noticeable. But when viewed on a mobile device you see that the image and contact form are left aligned and the map is centered.

    Anyone know the code to add to my child theme ? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • mbcoulter

    (@mbcoulter)

    A quick and dirty way to do this is…

    Fix for the image:

    [code]
    div.textwidget {
    text-align: center;
    }
    [/code]

    For the form:

    [code]
    form.wpcf7-form.cf7-style.cf7-style-196 {
    margin: auto;
    }
    [/code]

    Thread Starter mikecomp

    (@mikecomp)

    Quick and dirty will work for me. Worked like a charm ! I’d call it quick and clean.

    Thanks alot for your help.

    mbcoulter

    (@mbcoulter)

    Cool!

    Thread Starter mikecomp

    (@mikecomp)

    Today I’ve noticed that the WordPress admin bar is missing on my website as I’m logged in. I tried deleting that css code you gave to see if that was the issue, and it seems to be so. It’s the second part:

    form.wpcf7-form.cf7-style.cf7-style-196 {
    margin: auto;
    }

    When I delete this from my child theme the admin bar reappears. I add the code back and it disappears. Tried it a few times to confirm. Any idea how to tweak this so that the admin bar does not disappear ?

    Thanks,
    Mike

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to Center Align content in sidebar text widget ?’ is closed to new replies.