Jump to content

just aligning the text


DEVILofDARKNESS

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/151499-just-aligning-the-text/
Share on other sites

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>


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.