Jump to content

not validating my img atts


lilyofthevalley

Recommended Posts

Although it is doing what it's supposed to do, when I try to validate what's below (the CSS does validate), I get the following error:Line 16 column 74: document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag.Code:

<img class="displayed" src="img/latestreads.gif" alt="latest reads" />

The CSS that corresponds to this:

img.displayed {display:block;	margin-left:auto;	margin-right:auto}

As you can see from the CSS, I have specifically defined img.displayed. Any thoughts on this?

Link to comment
Share on other sites

Ok---just got it. Figures, right after I post it. You can't put a block element in an inline element like <a>.I created a new <h>, and it's working perfectly with a text-align:center, I just need to tweak something position wise due to the extra space now to fix the design overall.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...