Hi, I am trying to validate one of my sites and this is the error I get while validating at validator.w3.org and this is the code How can I change the code so it gets validated as XHTML 1.0 Strict! Thanks
use div float to validate <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <div style="float:right"><table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td>asdfasdf asdfsa asdf asdfsadf asdf sdfas asdf sadfas sdfas dasdfsdf sfg sdfg dsfg dsfgasdfasdf asdfsa asdf asdfsadf asdf sdfas asdf sadfas sdfas dasdfsdf sfg sdfg dsfg </td> </tr> </table> </div> </body> </html> Code (markup):
Floats don't need heights. Anyhoo, no reason not to just float the table itself : ) Screw the extra div.