• Whenever I add an img to my post (not running any photo plugins) I’ll add an image by basically linking to the picture with the img button. However, when I run the validate xhtml link, it’ll always give me that my images aren’t xhtml compatible since I’m using some html code like the center code. How do I go about centering my images so that it’ll be xhtml compatible?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter lawtai

    (@lawtai)

    heh yea, i figured out that i needed the alt, but how do i center things and have them xhtml compliant?

    Thread Starter lawtai

    (@lawtai)

    lol nm, i’ve got a lot to learn with html/xhtml

    Though that isn’t semantically correct, it does get the job done. Remember, the <center> tag is XHTML 1.0 Transitional compliant, and semantically correct.

    I don’t know why it wouldn’t be semantically correct. I use div’s to place a block of text with an image and drop shadow on all my posts. Though, granted, if I simply wanted to center an image, I would probably go a different route.

    I do it this way:
    In the CSS
    div.cent {
    text-align: center;
    }
    In a post
    <div class="cent"> <img src="https://wherever" alt="" /></div>

    I second podz. I have defined several reuseable classes for left center right, images or logos etc with fancy borders. Easy to handcode them into the img tag,
    as required.

    pezastic: Both those have been posted in a thread. The first is a bit tricky so I won’t try it off the top of my head, but I will check back after church. If you haven’t found the threads, I will post more then.

    Here’s a thread describing how I handle photos.
    As for borders and drop shadows, just add a border property to the CSS selector and experiment.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Getting posts to be xhtml valid’ is closed to new replies.