dmccabe Posted March 7, 2008 Share Posted March 7, 2008 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 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 More sharing options...
fnairb Posted March 7, 2008 Share Posted March 7, 2008 Try adding display:inline; to your h7 style Link to comment https://forums.phpfreaks.com/topic/94893-aligning-table-items-going-insane/#findComment-486206 Share on other sites More sharing options...
eddierosenthal Posted March 9, 2008 Share Posted March 9, 2008 assign to the image rule to align left. Link to comment https://forums.phpfreaks.com/topic/94893-aligning-table-items-going-insane/#findComment-487888 Share on other sites More sharing options...
haku Posted March 10, 2008 Share Posted March 10, 2008 align is a deprecated element. Link to comment https://forums.phpfreaks.com/topic/94893-aligning-table-items-going-insane/#findComment-488210 Share on other sites More sharing options...
dmccabe Posted March 10, 2008 Author Share Posted March 10, 2008 Thanks for the replies, however I gave up in the end and started again from scratch with cleaner code and it works a treat now, although not in IE :/ Link to comment https://forums.phpfreaks.com/topic/94893-aligning-table-items-going-insane/#findComment-488359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.