Hi, I am trying to validate my webpage but get 2 errors, wondered if anyone could help me. First error is Line 21, Column 59: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag . The code in question is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254" /> <title>Christa Miller</title> <meta name="description" content="Christa Miller pictures and videos"/> <meta name="Keywords" content="Christa Miller,Christa Miller Pictures" /> <link rel="stylesheet" type="text/css" href="tema.css" /> <style type="text/css"> <!-- .style2 {color: #F75810; font-size: 11px; } --> </style> </head> <body> <div id="main"> <div align="center"><span class="style2"><?php include ("header.html"); ?> </span></div> <div id="linkdumb"> <h1>CHRISTA MILLER </h1> <div id="dumbs"> Code (markup): The second error is Line 30, Column 26: there is no attribute "height" . Code in question is the height tag I used for a table to seperate a picture and text (Pic on left hand side and text on right hand side) The code is <table width="516" height="349" border="0"> Code (markup): Thanks
1. give the complete HTML, maybe you failed to close a <div> or other tags. 2. the "height" attribute is not recognized by w3c. check http://w3schools.com if height is possible, better declare it on css. But so far it's documented on their site that "height" is not recognized.
Okay, here is complete html for first bit <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254" /> <title>Christa Miller</title> <meta name="description" content="Christa Miller pictures and videos"/> <meta name="Keywords" content="Christa Miller,Christa Miller Pictures" /> <link rel="stylesheet" type="text/css" href="tema.css" /> <style type="text/css"> <!-- .style2 {color: #F75810; font-size: 11px; } --> </style> </head> <body> <div id="main"> <div align="center"><span class="style2"><?php include ("header.html"); ?> </span></div> <div id="linkdumb"> <h1>CHRISTA MILLER </h1> <div id="dumbs"> <table width="516" height="349" border="0"> <tr> <td width="259"><img src="christa-miller.jpg" alt="Christa Miller" width="213" height="320" /></td> <td width="247"><div align="center"> <p><strong>Pictures and Videos </strong></p> <p><a target="_blank" class="link3" href="http://images.google.com/images?svnum=10&hl=en&q=christa+miller&btnG=Search+Images">1</a><a href="http://images.google.com/images?svnum=10&hl=en&q=Sarah+Chalke&btnG=Search+Images" target="_blank"></a><br /> <a target="_blank" class="link3" href="http://images.search.yahoo.com/search/images;_ylt=A9iby4BpKe1GS0QBKyWJzbkF?p=christa+miller&ei=UTF-8&fr=sfp&x=wrt">2</a><br /> <a target="_blank" class="link3" href="http://search.msn.com/images/results.aspx?q=christa miller&FORM=QBIX">3</a><br /> <a target="_blank" class="link3" href="http://www.imdb.com/rg/photos-name/gallery-link//gallery/granitz/6172/Events/6172/ChristaMi_Jemal_14221664_400.jpg?path=pgallery&path_key=Miller,%20Christa">4</a><br /> <a target="_blank" class="link3" href="http://www.starpulse.com/Actresses/Miller,_Christa/Pictures/">5<br /> </a><a target="_blank" class="link3" href="http://www.youtube.com/results?search_query=christa+miller&search=Search">6</a><a href="http://images.google.com/images?svnum=10&hl=en&q=Sarah+Chalke&btnG=Search+Images" target="_blank"></a><br /> <br /> <strong>Christa Miller</strong> is best known for her role in the <strong>Drew Carey Show</strong> as 'Kate' as well as the role as <strong>Jordan Sullivan</strong> in her husbands show <strong>Scrubs</strong>. She has also made appearances in <strong>Seinfield</strong>, <strong>Fresh Prince Of Bel Air</strong> and <strong>Party Of Five</strong>.</p> </div> </td> </tr> </table> <br /> <br /> </div> <div align="center"><span class="style2"><br /> <br /> <?php include ("bottomads.html"); ?> </span></div> </div> <div id="links"></div> <div id="alt"> <div align="center"><span class="style2"> <?php include ("bottom.html"); ?> </span></div> </div> </div> </body> </html> Code (markup): First second bit, I do have a css file, what do I need to put in there? Thnx
first, remove all attributes on the <table> then declare it on css table { width: 516px; height: 349px; border: 0; } /*--add other attributes if needed, for now this is what I see on your code that I added --*/ Code (markup): Try it and comment if there's a problem.
Hmm, it didnt work, the text is now under the picture? When you say remove all attributes what do you mean exactly? The table is now in the css but it isnt showing up on the actual page? Thnx
From this code <table width="516" height="349" border="0"> HTML: to this <table> HTML: I just followed your code on the table if you want to show up the lines of the table change the CSS to: table { width: 516px; height: 349px; border: 1px solid #000000;/*--- change the thickness of the border if needed --*/ } Code (markup): I checked the page on FF, IE, Opera, Flock and the text is beside the image, or on the other cell that is.
I'm still getting the other error Line 21, Column 59: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag. <div align="center"><span class="style2"><div id="header"></div>
just taking a wild stab.. it might have something to do with your closing div tag for id="dumbs", you open it outside of the table and close it on the inside.. or at least that's how it looks to me.. if it's not that i would look through all your div tags and find out where their closing tags are