• Resolved scotttraveler

    (@scotttraveler)


    I’ve read a half dozen “fixes” on this topic and I’ve not had any luck getting my photos to center. I tried adding some of the suggested code to my css file but that didn’t seem to fix the problem.

    My files align left whether or not I select “center” when I format the photos.

    When I imported my pages/posts from the .Wordpress site, they seem to align center but if I modify any of the photos (change links to the new blog), they align left:

    Iran

    I’m using the theme Black Letterhead, my css code is, any help fixing this would be appreciated:

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Can you post your code on pastebin.com instead? Long code excerpts like that break things ??

    Thread Starter scotttraveler

    (@scotttraveler)

    I forgot to include a page that has the issue:

    https://scotttraveler.com/iran/

    In style.css (line 603) change .aligncenter, div.aligncenter to just div.aligncenter.

    Thread Starter scotttraveler

    (@scotttraveler)

    https://pastebin.com/m8M3nELB

    hopefully that works ??

    Try removing:

    .entry img, .entrytext img {
        margin: 7px;
    }

    from style.css.

    Thread Starter scotttraveler

    (@scotttraveler)

    neither seems to have fixed it ??

    Couple of fix actually:

    1. As Esmi said you have to remove

    .entry img, .entrytext img {
        margin: 7px;
    }

    2. Or you can modify it to:

    .entry img, .entrytext img {
        margin: 7px auto;
    }

    3. Overwrite the margin left and right

    .aligncenter, div.aligncenter {
        display: block;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    or

    .aligncenter, div.aligncenter {
        display: block;
        margin: auto !important;
    }

    Thanks!

    Which web browser are you using? If you have Firefox, try the Firebug add on. It can help you to figure out what to change.

    Try changing line 603 to:

    .aligncenter, div.aligncenter {
        display: inline;
    Thread Starter scotttraveler

    (@scotttraveler)

    Interesting, I haven’t applied your last recommendation yet but was wondering about the browser.

    I am using Firefox and they align left, I opened the page in explorer and they are aligned center.

    …?

    Thread Starter scotttraveler

    (@scotttraveler)

    I updated my Firefox and then added Firefly – what a cool tool. I have quite a bit to learn, buzzed through some of it and there is a lot to look at.

    I pulled the css file from the theme from scratch and tried @ Photoshop Tutorial’s suggestions & then looked at the page. No dice.

    Then I ADDED @ Jonas’ suggestion & it worked! Yay! Been fighting this monster for 3 days now.

    Thanks to all for your help. Now I’ve got about 2 1/2 years of photos to upload to the new site to replace out the links to the WordPress page…

    ??

    Mark this post as resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Photos won't align to center’ is closed to new replies.