lilyofthevalley Posted January 8, 2007 Share Posted January 8, 2007 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 More sharing options...
lilyofthevalley Posted January 8, 2007 Author Share Posted January 8, 2007 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 More sharing options...
Anders Moen Posted January 14, 2007 Share Posted January 14, 2007 No, what's the code you put in? I have the same problem... Link to comment Share on other sites More sharing options...
jlhaslip Posted January 15, 2007 Share Posted January 15, 2007 The image needs to be contained within a block level element, like this: <div><img class="displayed" src="img/latestreads.gif" alt="latest reads" /></div> Link to comment Share on other sites More sharing options...
Anders Moen Posted January 15, 2007 Share Posted January 15, 2007 Ok, but I don't have the same problem then...maybe you can figure it out though Here's my Web site:http://www.andersmoen.hotserv.dkHere's the validation results:http://validator.w3.org/check?uri=http%3A%...moen.hotserv.dk Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now