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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.