centering problem

  • Anonymous



    I contact you because I have difficulties to center some items (see the homepage of my website in progress)

    For example, I added three buttons (Called “GORGE”) and there are always a little more left than right.

    I tried several things without success

    Can you explain how to solve this problem?

    And thank you again for your excellent work.


    Kenneth John Odle


    You have all of them wrapped in a <div> with an ID of centerdiv.

    1) Change that ID to a class.

    2) Add this to your child theme stylesheet or custom CSS option:

    .centerdiv {
    padding-left: auto;
    padding-right: auto;

    3) You have each of those images wrapped in this: <div style="float: left;">. That is why they are all going to the left. Remove the <div> around each button. Just add the buttons:

    <div class="centerdiv">
    <a href="">
    </a><a href="">
    </a><a href="">



    HI, thanks for your answer, but if i do this, images are aligned vertically, while I want them side by side.

    In addition, even if there is only one image in this div, it moves to the left and not the center of the page

    Have I missed something?

    Thanks for your time.



    Remove all the <br> inside the centerdiv and add text align

    .centerdiv {
    margin: 0 auto;
    text-align: center;



    Thanks a lot!

    I did not think that the
    centerdiv had an impact.

    Thank you very much for helping.

Viewing 5 posts - 1 through 5 (of 5 total)

  • You must be logged in to reply to this topic.
Graphene Themes Forum