Imoddedu Posted May 3, 2009 Share Posted May 3, 2009 I cannot seem to find out why these two tables are under each other, when they should be right next to each other.Here is the code- <!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" xml:lang="en"><head><title>Suite4Gamers | Home </title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="keywords" content="Coding, Free, Website, Programming, Gaming, Free Gaming, Gaming Community, Mapping, Game Mapping, Game Programming, Forums, Game Forums, Gaming Forums, Free Gaming Forums, Steam, Source, Source SDK, Source SDK Tutorials, Game Modding, Modding, Game Tutorials, Game Making, Wiki" /> <meta name="description" content="Suite4Gamers, a gaming discussion and development website" /> <meta name="robots" content="all" /> <link rel="stylesheet" type="text/css" href="style1.css" /></head><body><div width="730" align="center"> <table width="730" height="90" cellspacing="0" cellpadding="0" class="header"> <tr width="730" height="90"> <td width="730" height="90"> <img src="/Images/s4gheader.png" /> </td> </tr> </table> <br /> <table width="730" height="60" cellspacing="0" cellpadding="0" align="center"> <tr width="730" height="60"> <td width="730" height="60"> <center> <a href="http://suite4gamers.com"><img src="/Images/home.png" /></a> <a href="http://suite4gamers.com/about/"><img src="/Images/about.png" /></a> <a href="http://suite4gamers.com/downloads/"><img src="/Images/download.png" /></a> <a href="http://suite4gamers.com/forums/"><img src="/Images/forums.png" /></a> <a href="http://suite4gamers.com/chat/"><img src="/Images/chat.png" /></a> <a href="http://suite4gamers.com/support/"><img src="/Images/support.png" /></a> </center> </td> </tr> </table> <br /> <table width="730" cellspacing="10" cellpadding="0" align="center"> <tr width="730"> <td> <table width="200" height="200" cellspacing="0" cellpadding="1" class="body"> <tr width="200" height="15" class="body"> <td width="200" height="15"> <center> <span class="bodyhead"><b><i>..::Login</i></b></span> </center> </td> </tr> <tr width="200" height="185" class="body1"> <td width="200" height="185"> <form action="http://suite4gamers.com/forums/ucp.php?mode=login" method="post"> <center> <span class="body">Username:</span> <input type="text" name="username" value="" id="username"> <span class="body">Password:</span> <input type="password" name="password" id="username"> <input type="submit" name="login" value="Login" /> </center> </form> <span class="body">Dont have an account? Register <a class="bodylink" href="http://suite4gamers.com/forums/ucp.php?mode=register">here</a></span> </td> </tr> </table> <table width="348" height="200" cellspacing="0" cellpadding="1" class="body"> <tr width="200" height="15" class="body"> <td width="200" height="15"> <center> <span class="bodyhead"><b><i>..::Welcome</i></b></span> </center> </td> </tr> <tr width="200" height="185" class="body1"> <td width="200" height="185"> <span class="body">Welcome to Suite4Gamers! You have just found the crossroads between all gamers! Here at Suite4Gamers we support a variety of topics entertaining to gamers. Check out our forums dedicated to gaming news, development, programming, and more. Registering for Suite4Gamers is fast and easy. Start your ultimate experience today! Click that register link!</span> </td> </tr> </table> </td> </tr> </table> </div> </body></html> Link to comment Share on other sites More sharing options...
thescientist Posted May 3, 2009 Share Posted May 3, 2009 if you know about CSS, why are you using tables? Link to comment Share on other sites More sharing options...
Imoddedu Posted May 3, 2009 Author Share Posted May 3, 2009 Because, I find tables easier to use. Link to comment Share on other sites More sharing options...
fabs Posted May 3, 2009 Share Posted May 3, 2009 yead just use CSS Link to comment Share on other sites More sharing options...
fabs Posted May 3, 2009 Share Posted May 3, 2009 ya, just use CSS Link to comment Share on other sites More sharing options...
Imoddedu Posted May 3, 2009 Author Share Posted May 3, 2009 I'm using CSS though. Link to comment Share on other sites More sharing options...
thescientist Posted May 3, 2009 Share Posted May 3, 2009 I'm using CSS though.yes...<link rel="stylesheet" type="text/css" href="style1.css" />and no. <div width="730" align="center">a div should have an id attribute in it and width and justification should come from the stylesheet. Also, your doctype is incorrectly quoted. you should try fixing your doctype and then validating your page and you'll see what we mean about using tables for layouts. Link to comment Share on other sites More sharing options...
thescientist Posted May 3, 2009 Share Posted May 3, 2009 <table width="730" height="90" cellspacing="0" cellpadding="0" class="header"> <tr width="730" height="90"> <td width="730" height="90"> <img src="/Images/s4gheader.png" /> </td> </tr> </table> also, that's a lot of code just to display an image. Link to comment Share on other sites More sharing options...
Imoddedu Posted May 3, 2009 Author Share Posted May 3, 2009 Should I go with strict? Link to comment Share on other sites More sharing options...
thescientist Posted May 3, 2009 Share Posted May 3, 2009 its been discussed here recently that HTML strict is the most practical doctype to write for these days, as XHTML has not been adopted/accepted yet by the major browser types. As such, it would be in your best interest to take your tables out and replace them with a couple of div's. much cleaner and leaner. Link to comment Share on other sites More sharing options...
Imoddedu Posted May 3, 2009 Author Share Posted May 3, 2009 Ok I'll see what I can do. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.