WordPress.org

Ready to get started?Download WordPress

Forums

img border attribute not valid xhtml 1.1? (3 posts)

  1. Quantum
    Member
    Posted 10 years ago #

    Am I correct in the assumption that the border attribute for image tags is not valid xhtml 1.1?
    If this is the case why does wordpress add it when you paste code from an uploaded image?
    I was under the impression that wordpress was xhtml 1.1 compliant.

  2. lars
    Member
    Posted 10 years ago #

    Your assumption seems to be correct, see:
    XHTML Image Module.
    Since the border is presentational, it should be removed with CSS:
    <pre>
    img {
    border:none;
    }
    </pre>
    I haven't tried WordPress's image upload function though, so can't say anything about that.
    /Lars

  3. Mike Little
    Member
    Posted 10 years ago #

    Hi Quantum/Lars,
    I have now fixed this in CVS. I remvoed the border from the img tag generated on file upload, and I also added a default style for image anchors to turn off borders.
    a img { border : none; }
    Mike

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.