Forums

Images not aligning in post (10 posts)

  1. audaciousjenny
    Member
    Posted 2 years ago #

    My site http://www.auadaciousgirl.com is having problems keeping images aligned under each other after I click save draft or publish. Could someone visit my site,go to entertainment category and scroll down. You will see 2 images, one is aligned left, other is aligned random. I not very good with HTML codes, but I am willing to learn.

    Thanks

  2. dcannon1
    Member
    Posted 2 years ago #

    In the visual editor you can set alignment when you insert images which should allow you to set align to none, and then just use the visual editor to put a link break between the images.

  3. audaciousjenny
    Member
    Posted 2 years ago #

    What is a link break?

  4. dcannon1
    Member
    Posted 2 years ago #

    line break* typo

  5. audaciousjenny
    Member
    Posted 2 years ago #

    Ok, I'm still confused. Is there a button to do this or do I type it somewhere?

  6. Shane G.
    Member
    Posted 2 years ago #

    Hi,

    You need to copy the this code and paste it in style.css of the theme.

    i`mg.centered
    {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    img.alignright
    {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;
    }

    img.alignleft
    {
    padding: 4px;
    margin: 0 7px 2px 0;
    display: inline;
    }

    .alignright
    {
    float: right;
    }

    .alignleft
    {
    float: left;
    }`

    Add this code in style.css file.of your theme and it should be resolve the problem. If it does not solve the problem then replace the .img{} tags with the above code in style.css.

    Thanks,

    Shane G.

  7. audaciousjenny
    Member
    Posted 2 years ago #

    Do I paste it at the bottom or in a specific spot? FYI- I have no idea what these codes mean but I'm learning. Could you explain what the codes mean for my future reference? Thanks

  8. audaciousjenny
    Member
    Posted 2 years ago #

    Question: Add the code in wordpress editor for style.css? of Go to my hosting files and add there in the theme's style.css

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    img.centered
    {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }
    
    img.alignright
    {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;
    }
    
    img.alignleft
    {
    padding: 4px;
    margin: 0 7px 2px 0;
    display: inline;
    }
    
    .alignright
    {
    float: right;
    }
    
    .alignleft
    {
    float: left;
    }

    shane had a slight mistype, corrected here (the tic in the first line)

    You can add the code to the end of your css most likely, from in the editor or through hosting files....either way gets you to te same style.css file

  10. audaciousjenny
    Member
    Posted 2 years ago #

    Rvoodo, it did not work. I added it at the end of style.css in wordpress editor. Any other suggestions?

    Thanks for helping me everyone.

Topic Closed

This topic has been closed to new replies.

About this Topic