Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS display: block; margin problems? Am I being silly?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36014
    desttE
    Member

    Hello there,

    CSS-Tricks and its members are amazing… Just getting that out there. Great resource for people who are wanting to learn.

    Anyway:

    I’m trying to center an image and am using the display: block; margin-right: auto; margin-left: auto; method.

    Whenever I stack two of these centered images on top of each other, the top and bottom margins seem to not make sense? Is there a way to set consistant top and bottom margins?

    Oh and I have another quick question… When aligning an image to the left in WordPress, how would you go about preventing text from wrapping around on the right hand side without inserting clear after every image?

    Any help would be greatly appreciated.

    Thanks. :)

    #94239
    desttE
    Member

    Thanks for the reply cnwtx.

    I have tried that and still no luck.

    If you have a look here: http://www.inlmbrt.com/2012/01/image-alignment-testing/ you will see what I mean.

    #94248
    tuckyhutsman
    Member

    Perhaps you mean that the margin between two images is more than the margin between an image and text above or below the image?

    I notice you have a
    element between each image. That is blowing extra space between you images. Your

    elements appear to have no margin at all, I’m not sure what you are looking for, but those are the places I see possible culprits for unexpected styling issues.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.