ZandarKoad Posted April 28, 2015 Share Posted April 28, 2015 I spent the last two hours deleting parts of the css file until it was all gone. I've deleted everything I possibly can, and yet the (second) table STILL won't go to the top. You'll notice I threw in a random non-php table that jumped to the top just fine...It seems like just having some PHP processing forces the table down some random distance... I'm lost. Here's the URL:http://gator3241.hostgator.com/~zandar/zetabeta/index2.phpHere's the code: <?php $servername = "123.123.123.123"; $username = "------"; $password = "------"; $dbname = "zandar_zetabeta"; $firsttablename = "english_phrases"; $secondtablename = "cebuano_phrases"; mysql_connect($servername,$username,$password); @mysql_select_db($dbname) or die("Unable to select database"); $query="SELECT phrase_index_key, phrase_content, author FROM english_phrases"; $en_result=mysql_query($query); $en_num=mysql_numrows($en_result); $query2="SELECT phrase_index_key, phrase_content, author FROM cebuano_phrases"; $ceb_result=mysql_query($query2); $ceb_num=mysql_numrows($ceb_result); mysql_close(); ?> <table style="width:100%"> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> </table> <table> <tr><th>Phrase ID</th><th>English Phrase</th><th>Cebuano Phrase</th><th>Author</th></tr> <? $i = 0; while ($i < $en_num) { $field1name = mysql_result($en_result, $i, "phrase_index_key"); $field2name = mysql_result($en_result, $i, "phrase_content"); //English $field3name = mysql_result($ceb_result, $i, "phrase_content"); //Cebuano $field4name = mysql_result($en_result, $i, "author"); echo "<tr>"; echo "<td>$field1name</td> <td>$field2name</td> <br> <td>$field3name</td> <td>$field4name</td> <br>"; echo "</tr>"; $i++; } ?> </table> Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/ Share on other sites More sharing options...
requinix Posted April 28, 2015 Share Posted April 28, 2015 You can't put BRs between table cells like that. The browser has to try to deal with the invalid markup you've given it, and it apparently does so by interpreting those as being placed before the table. Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/#findComment-1510205 Share on other sites More sharing options...
Barand Posted April 29, 2015 Share Posted April 29, 2015 Looks like you'll be losing your blue badge. What colour is the "God" badge? Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/#findComment-1510231 Share on other sites More sharing options...
requinix Posted April 29, 2015 Share Posted April 29, 2015 Purple? Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/#findComment-1510241 Share on other sites More sharing options...
Barand Posted April 29, 2015 Share Posted April 29, 2015 I was thinking Imperial Purple, but then Gold. Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/#findComment-1510245 Share on other sites More sharing options...
Muddy_Funster Posted April 29, 2015 Share Posted April 29, 2015 Can't be "God" because he himself coudn't do it...will need to be something more skilled and powerfull than him....hmmm. Answers on a postcard? Link to comment https://forums.phpfreaks.com/topic/295921-god-himself-couldnt-get-this-table-to-the-top-of-the-page/#findComment-1510247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.