Jump to content

aligning table items - going insane!


dmccabe

Recommended Posts

Ok so I will admit I am far from being the greatest coder in the world, but I can manage most things with a bit of tinkering.

 

However CSS layouts give me the biggest headache in the world.

 

I wonder if anyone can save me from having to stab myself in the eye with a fork over this one.

 

All I am trying to do is what looks like an ID card for our company phone book display that I have made.

 

Here's what I currently have:

 

php/html

	echo "<div id=\"idcard\">";
echo "<table width=\"500px\" height=\"300px\">";
echo "<tr>";
echo "<td rowspan=\"3\" width=\"101px\" height=\"130px\" style=\"background: url(./images/photos/$imagename) no-repeat left top \"></td>";
echo "<td align=\"top\"><h7>".$info[0]["cn"][0]."</h7></td>";
echo "</tr>";
echo "</table>";
echo "</div>";

 

css

h7 {
align: center;
valign: top;
font-family: Verdana;
font-size: 20pt;
color: #FFFFFF;
text-decoration: underline;
font-weight: bold;
}


#idcard table {
background: url(./images/idcard-rev1.png) no-repeat center;
padding: 20px 0px 0px 20px;
}</td>

 

 

Result

idcardwh4.jpg

 

Now what I want is for the text "Darren McCabe"  which  is this line:

<td align=\"top\"><h7>".$info[0]["cn"][0]."</h7></td>

 

:to be at the top in the middle of the ID card, then I wanna put some more text underneath, while all he time keeping the photo thing in the top left.

 

Help Obi wan kenobi your my only hope!

Link to comment
https://forums.phpfreaks.com/topic/94893-aligning-table-items-going-insane/
Share on other sites

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.