WordPress.org

Support

Support » Requests and Feedback » img border attribute not valid xhtml 1.1?

img border attribute not valid xhtml 1.1?

  • Quantum
    Member

    @quantum

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    Mike Little
    Participant

    @mikelittle

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘img border attribute not valid xhtml 1.1?’ is closed to new replies.