Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
Can a table cell contain an absolute element? Bluestreak
I have a three column layout and I am trying to get my absolutely positioned sidebars contained within <td> cells, but they always spill out anyway.
Here's a sample code to show what I mean:
top:177px; font-size:8pt; position:absolute; width:160px; left:5px; }
I am a real novice at this absolute positioning stuff but with a bit of help from here I did get an absolute positioned left side bar to work, YMMV. I did not put my abs. pos. element in the td tags but just had a div to clear the space. I put the abs. position code at the bottom of the html page as I didn't want the SE to pick up the navigation menu at the top. It was a bit fussy to get the abs. pos. sidebar to center properly.
<table width="100%" border="1" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr class='midrow'><td style="width:17.5%;background:#009999;"> <div id="clearleft">
</td> ..... rest of the page and at the bottom. </table> <div id="leftsidebar"> <?php include("left_sidebar.inc"); ?> </div>
and for the css:
width:100%; height:1400px; overflow:hidden; background:#009999; }
position:absolute; top:320px; left:15px; width:15%; height:1350px; background:#009999; text-align:center; } Bluestreak
I looks like you placed the sidebar outside the table though. Not sure this will work with my setup though.