DEVILofDARKNESS Posted March 28, 2009 Share Posted March 28, 2009 After I worked out whole my php code I saw that my html wasn't aligned proper. Now you have IMG text(at the top of the table row) IMG And I want to have IMG text(in the center of the table row) IMG <img src="<?php echo $nation['nation_flag']; ?>" align="left"></img><b><u><center>Government of <?php echo $nation['nation_name']; ?></center></u></b><img src="<?php echo $nation['nation_symbol']; ?>" align="right"></img> The center tags don't work like I suspected. Quote Link to comment https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/ Share on other sites More sharing options...
POG1 Posted March 28, 2009 Share Posted March 28, 2009 <img src="<?php echo $nation['nation_flag']; ?>" style="float:left;" /> <img src="<?php echo $nation['nation_symbol']; ?>" style="float:right;" /> <b><u><center>Government of <?php echo $nation['nation_name']; ?></center></u></b> <br style="clear:both" /> Quote Link to comment https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/#findComment-795719 Share on other sites More sharing options...
haku Posted March 30, 2009 Share Posted March 30, 2009 <b>, <u> and <center> tags are all deprecated, and should not be used. Quote Link to comment https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/#findComment-796628 Share on other sites More sharing options...
DEVILofDARKNESS Posted March 30, 2009 Author Share Posted March 30, 2009 Now the page looks like this: http://europia.uuuq.com/government.php?nation_id=1 ? The Text should be in the middle. Quote Link to comment https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/#findComment-796741 Share on other sites More sharing options...
timmah1 Posted April 4, 2009 Share Posted April 4, 2009 If you want the photo to the left and the text centered, do this <html> <head> <title> Europia! </title> <meta name="author" content="Kruptein"> <link rel="shortcut icon" href="/images/favicon.ico"> </head> <body> <!--<embed src="" loop="false" hidden="true" autostart="true"></embed>--> <table border="1" width="100%" height="100%"> <tr> <td colspan = "3" height="15%"> <img src="/images/NoPact.jpg" style="float:left;" /> <img src="" style="float:right;" /> Government of SalidriE<br style="clear:both" /> </td> </tr> <tr> <td width="10%"> <iframe src="/navigation/loggedin.php?nation_id=''" frameborder="0" width="100%" scrolling="no" height="100%"></iframe> </td> <td height="80%" width="90%"> <table border="1" height="100%" width="100%"> <tr> <td width='80%'> <b><u>Last Events:</u></b><p> </td> <td width="20%" align="center"><a href="/alliance.php?alliance_id=1"><img src="/images/NoPact.jpg" border="0" align="left"></img></a><br> alliance name: <a href='/alliance.php?alliance_id=1'>You don't have an alliance</a><br># money: 500<br>Nation Song: <br>Nation Symbol: </td> </tr> </table> </td> </tr> <tr> <td colspan = "3" height="5%"> <center>Made by Kruptein</center> </td> </tr> </table> </body> </html> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-950416-50"); pageTracker._trackPageview(); } catch(err) {}</script> If you want everything centered, do this <html> <head> <title> Europia! </title> <meta name="author" content="Kruptein"> <link rel="shortcut icon" href="/images/favicon.ico"> </head> <body> <!--<embed src="" loop="false" hidden="true" autostart="true"></embed>--> <table border="1" width="100%" height="100%"> <tr> <td colspan = "3" height="15%"> <img src="/images/NoPact.jpg" style="float:left;" /> <img src="" style="float:right;" /> Government of SalidriE<br style="clear:both" /> </td> </tr> <tr> <td width="10%"> <iframe src="/navigation/loggedin.php?nation_id=''" frameborder="0" width="100%" scrolling="no" height="100%"></iframe> </td> <td height="80%" width="90%"> <table border="1" height="100%" width="100%"> <tr> <td width='80%'> <b><u>Last Events:</u></b><p> </td> <td width="20%" align="center"><a href="/alliance.php?alliance_id=1"><img src="/images/NoPact.jpg" border="0"></img></a><br> alliance name: <a href='/alliance.php?alliance_id=1'>You don't have an alliance</a><br># money: 500<br>Nation Song: <br>Nation Symbol: </td> </tr> </table> </td> </tr> <tr> <td colspan = "3" height="5%"> <center>Made by Kruptein</center> </td> </tr> </table> </body> </html> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-950416-50"); pageTracker._trackPageview(); } catch(err) {}</script> Quote Link to comment https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/#findComment-800929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.