Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to add the following CSS to the div in which you want to centre the image/text –

    text-align: center;

    Thread Starter robhob

    (@robhob)

    How would I do that in the WordPress page editor? I’ve tried it like this but it’s not working:
    <div text-align: center;>
    [one_half]
    <img src=”/wp-content/themes/config/images/icons/phone.png” alt=”” /> <h7>021 534 7653</h7>
    [/one_half]

    [one_half_last]
    <img src=”/wp-content/themes/config/images/icons/phone.png” alt=”” /> <h7>021 534 2847</h7>
    [/one_half_last]
    </div>

    Thry this –

    <div style="text-align: center;">

    But with not knowing the ins-and-outs of your code, it may not work, depending on how your page is set up before that.

    Thread Starter robhob

    (@robhob)

    Thanks, but that also didn’t work. I’m entering this into the html section of a normal WP page… should something like this work there?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to centre text and image horizontally’ is closed to new replies.