WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image disappears using float (6 posts)

  1. Jo5329
    Member
    Posted 9 years ago #

    I have been banging my head against the keyboard all morning. I have my css code for images set like Codex says to for float and centered. However on this post:

    http://joscafe.com/2005/07/07/29th-regiment-coc/

    When I tried to use alignright or alignleft as instructed, the text floats like it's suppose to but the image is blank. I can move the mouse of it and the alt tag shows up, but the picture is like transparent! Any ideas? I have since removed the align class from the image so it continues to show.

    Here is my css for imgs:

    img {
    border-style: none;
    }

    a img {border:0}

    p img {
    padding: 0;
    max-width:100%;
    }

    img.centered {
    display:block;
    margin-left:auto;
    margin-right:auto;
    }
    img.pic {
    background:#fff;
    border:1px solid #ccc;
    }
    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;
    }

  2. Jo5329
    Member
    Posted 9 years ago #

    I went ahead and put my stuff in a table and the image shows up. I've done everything correct per Codex, so maybe it's just a glitch -- it's working fine with tables.

    But if anyone has any ideas why this wasn't working, it would be wonderful!

    Thanks

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I have no problems in IE or FF...

  4. Lorelle
    Member
    Posted 9 years ago #

    This is one of the browser bugs that plagues folks.

    Since you've now moved your stuff into tables, which is NOT appropriate since tables are for data not design, you will have to move them out to apply the fix.

    See: http://codex.wordpress.org/CSS_Fixing_Browser_Bugs

  5. Valerie
    Member
    Posted 8 years ago #

    This topic may actually address issues similar to the one explained here.

    Just trying to be helpful.

  6. hallierichter
    Member
    Posted 8 years ago #

    I am having the same problem and am not finding any answers that actually work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags