suttercain Posted April 19, 2007 Share Posted April 19, 2007 Hi everyone,I am having a major issue with a homepage I am working on, http://supermandatabase.com/index2.phpTake a look at it in Firefox and IE. As you can see the left column is aligned at the top, yet in IE it isn't and floats in the center. Is there a way to fix this?Here is the code that generate the page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">@import url("sd_style.css");</style><?phprequire ('get_connected.php');if (isset($_GET['id'])) { $sql = "SELECT * FROM news WHERE story_id = '" . mysql_real_escape_string($_GET['id']) . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); } } } $date = date('F jS, Y');?><title><?php echo $row['title']; ?></title></head><body><tr><td><?php include ('head.php'); ?></td></tr> <table width="986" border="0" cellspacing="0" cellpadding="5"> <tr> <td colspan="2" valign="top" bgcolor="#FFFFFF"> <?php echo "<h2>$date</h2>"; ?></td> <td width="17%" rowspan="4" valign="top" bgcolor="#CCCCCC"><script type="text/javascript"><!-- amazon_ad_tag = "thesupermanda-20"; amazon_ad_width = "160"; amazon_ad_height = "600";//--></script> <script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"></script><br><br> <script language="JavaScript" src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=snn%7Fhz&bdrcolor=000000&cid=0&eksize=10&encode=ISO-8859-1&endcolor=FF0000&endtime=y&fbgcolor=253b5a&fntcolor=000000&fs=0&gallery=y&hdrcolor=253b5a&hdrimage=1&hdrsrch=n&img=y&lnkcolor=000000&logo=3&num=25&numbid=y&paypal=n&popup=n&prvd=1&query=Superman+Comics&r0=4&shipcost=n&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=y&tbgcolor=FFFFFF&tlecolor=FF0000&tlefs=0&tlfcolor=000000&track=2176471&width=570"></script></td> </tr> <tr> <td width="32%" valign="top" bgcolor="#FFFFFF"> </td> </tr> <tr> <td> <div class="topcontainer">LATEST HEADLINE:</div> <div class="curlycontainer"> <div class="innerdiv"> <?php $sqls = mysql_query ("SELECT title, story_id, story_date, body, image FROM news ORDER BY story_id DESC LIMIT 0, 1"); while ($rows = mysql_fetch_assoc($sqls)) { $body = $rows['body']; $short = substr("$body", 0, 140); echo "<img src='images/news/" . $rows['image'] . "'/><br><br>"; echo "<font size ='4'><b><a href='view_news.php?id={$rows['story_id']}'>" . $rows['title'] . "</a></b></font><br>"; echo $rows['story_date'] . "<br>"; echo $short; } ?><br><br> </div> </div> <div class="topcontainer">VISIT OUR SPONSORS:</div> <div class="curlycontainer"> <div class="innerdiv"> <script type="text/javascript"><!--google_ad_client = "pub-5010266620835785";google_ad_width = 300;google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = "text_image";//2007-04-07: News Pagegoogle_ad_channel = "3594419381";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "000000";google_color_text = "000000";google_color_url = "263B5A";//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div> </div> </td></td> <td width="51%" rowspan="3" valign="top" bgcolor="#FFFFFF"> <div class="leftcontainer">RECENT HEADLINES:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //Daily Planet News Genrator! $sql = mysql_query ("SELECT title, story_id, story_date, body FROM news ORDER BY story_id DESC LIMIT 1, 5"); while ($row = mysql_fetch_assoc($sql)){ $body = $row['body']; $short1 = substr("$body", 0, 80); echo "<b><a href='view_news.php?id={$row['story_id']}'>" . $row['title'] . "</a></b><br>"; echo $row['story_date'] . "<br>"; echo $short1 . "<br>"; echo "<br>"; } ?> </table> </div> </div> <div class="leftcontainer">RECENT COMICS:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //COMIC Genrator $sql1 = mysql_query ("SELECT title, comic_id, issue_number, cover_art, cover_artists, writers, pencillers, cover_date FROM comics ORDER BY comic_id DESC LIMIT 0, 5"); while ($row1 = mysql_fetch_assoc($sql1)){ $cover_date = date('F, Y', strtotime($row1['cover_date'])); echo "<tr>"; echo "<td width='70'><a href='view_comics.php?id={$row1['comic_id']}'><img src='images/4ndvddb/" . $row1['cover_art'] . "' height='75px' width='50px'/></a><br></td>"; echo "<td><b><a href='view_comics.php?id={$row1['comic_id']}'>" . $row1['title'] . " #" . $row1['issue_number'] . "</a></b><br>Cover Date: " . $cover_date . "<br>Written By: " . $row1['writers'] . "<br>Cover Artists: " . $row1['cover_artists'] . "<br>Artists: " . $row1['pencillers'] . "</td>"; echo "</tr>"; } ?> </table> <?php $count_comics = mysql_query("SELECT comic_id FROM comics"); $comic_count =mysql_num_rows($count_comics); echo "<br>There are currently $comic_count comics in the database."; ?> </div> </div> <div class="leftcontainer">RECENT REVIEWS:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //REVIEW Genrator $query = "SELECT * FROM comics, reviews WHERE comics.comic_id=reviews.comic_id ORDER BY review_id DESC LIMIT 3";if ($result = mysql_query($query)) { while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; echo "<td width='70'><a href='view_reviews.php?id={$row['review_id']}'><img src='images/4ndvddb/" . $row['cover_art'] . "' height='75px' width='50px'/></a><br></td>"; echo "<td><b><a href='view_reviews.php?id={$row['review_id']}'>" . $row['title'] . " #" . $row['issue_number'] . "</a></b><br>Review Date: " . $row['review_date'] . "<br>Reviewed By: Michael Bailey <br>"; echo "</tr>"; } } ?> </table> <?php $count_reviews = mysql_query("SELECT review_id FROM reviews"); $reviews_count = mysql_num_rows($count_reviews); echo "<br>There are currently $reviews_count reviews in the database."; ?> </div> </div> </td> </tr> <tr> </tr> </table><?php include('foot.php'); ?></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted April 19, 2007 Share Posted April 19, 2007 The first thing you will want to do is make sure the page validates. Right now it is showing 93 errors. If you fix those, you may fix your problem with IE.http://validator.w3.org/check?uri=http://s....com/index2.php Link to comment Share on other sites More sharing options...
thawebman Posted April 27, 2007 Share Posted April 27, 2007 in the css you can let it float on a sertain spot 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