• Resolved sweetestfever

    (@sweetestfever)


    No matter what I set my images at [left, right or center] they stay left. So I am assuming it is stuck on left within the CSS. I have Firebug installed but I can’t figure out what to edit.

    I hope someone can help me. On my newer posts all my images are alright, so here is an older post to play with: https://www.ritsy.nl/inhoud-best-bodyshop-adventkalender-2013/

    The first image I put down as centered. The rest are just ‘normal’.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Tanath Fedo

    (@tanath-fedo)

    Delete:

    .content p img {
        margin-left: -15px;
        margin-right: -15px;
    }
    Tanath Fedo

    (@tanath-fedo)

    Add:

    .content p img {
        width:100%;
    }

    This will make image fit within the paragraph, so will have equal margins to left and right.

    Tanath Fedo

    (@tanath-fedo)

    Also, the images on the page you linked to are a smaller width than the ones on your Home page. Just edit the images to the correct size if you want them to look the same as the Home page images.

    Thread Starter sweetestfever

    (@sweetestfever)

    Thanks! That certainly helps for the broken images. Only issue now is the images that normally fit, don’t look good anymore.

    For example this post: https://www.ritsy.nl/paws-by-eddie/

    (haven’t actually edited it yet. Seeing it via firebug)

    Thread Starter sweetestfever

    (@sweetestfever)

    Oh haha, posted that before I saw you replied.

    Thread Starter sweetestfever

    (@sweetestfever)

    So I should make the images of my newer posts smaller to make them fit again?

    Tanath Fedo

    (@tanath-fedo)

    It depends. If you have a lot of old posts with smaller image dimensions hard coded inline inside the images attributes, it might be easier to just settle for the margin around the images, deleting the margin left:-15px, etc, and using width: 100% instead. That would change every post’s images in one swipe, with just CSS.

    If you keep your CSS as is, you’ll need to edit the inline width attribute of every image you put in a post that had that smaller width.

    Thread Starter sweetestfever

    (@sweetestfever)

    About 90% of my posts have smaller images. So the code you gave me will really help with that.

    It’s only the newer posts since I have this theme that fit. (Well they won’t after I add the code you gave me)

    The newer posts pictures are bigger which now makes them ‘hang’ over the post space. But if there is no quick fix code for that then I’ll just have to make them all slightly smaller.

    Thread Starter sweetestfever

    (@sweetestfever)

    Oh. Nevermind.. I must have been doing something wrong in firebug. I added your code and everything looks normal. In firebug it looked completely different. Well you’ve been a great help. Thank you very much! ??

    Tanath Fedo

    (@tanath-fedo)

    Keep in mind that 100% width attribute will affect every image you put in a post, so long as it’s inside a paragraph.
    You’d need to change the editor from visual to text mode and put div around it if you want an image to be smaller:

    <div><image src="https://www.blah.com/image1.jpg" /></div>

    Thread Starter sweetestfever

    (@sweetestfever)

    Yes! Will keep that in mind. Thank you!

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