Forum Moderators: open
I've been attempting, vainly, to "push" my main content area up above the left-side navigation area on my new sites template without success. I remember reading here a long time ago that there is a neat little trick to accomplish this - but for the life of me I can't find the post or remember how to do it. :)
Anyone willing to spill the secret of how you can push the code of the main content area above a left side navigation system in a 2 column table?
Thanks.
Jim
I think what you are after is the technique using z-index if this is right then you would create your tables and encapsulate them in div tags or any other suitable tags with the z-index set lower for the left hand nav i.e.
<div style="z-index:-5">
//left hand table or other form to make my nav
</div>
<div style="z-index:5">
//my main content
</div>
HTH,
-George
you need to set up your left hand column so it has an additonal <td> with nothing in it at the top:
¦-----------¦-----------------------------¦
¦empty..¦main content..........¦
¦-----------¦main content..........¦
¦nav......¦main content..........¦
¦nav......¦main content..........¦
¦nav......¦main content..........¦
¦nav......¦main content..........¦
¦nav......¦main content..........¦
¦-----------¦-----------------------------¦
hope this makes sense!
I think it involves the <div>s mentioned earlier. I don't know if it involves "z" index though. I thought that was to most used to position text behind images.
Maybe this post is better in the CSS forum. You could ask a mod to move it if you want.
That pretty much worked. This is the code I ended up with after all was said and done.
<CENTER>
<TABLE width=95% border=0 cellpadding=3 cellspacing=0 bgcolor="#FFFFFF">
<TR>
<TD width="250"><BR></TD><TD rowspan=2 valign=top>
Main Body (uses rowspan=2)
</TD>
</TR>
<TR>
<TD width="250">
Side Bar
</TD>
</TR>
</TABLE>
</CENTER>
Thanks for your help.
I can imagine that dynamic content in the right hand column that varies greatly in quantity from page to page might still give you trouble.
To add a PS to the original thread, if your right column gets too long and the content in the left column drops, add a bunch of break tags and non-breaking spaces to "push" it up.
Or surround your left column content with a div and put the following in CSS file to push the Div up:
.vertaligntop { vertical-align:top;
margin-top:0;
}
This doesn't work 100% on a very long column on right side but it helps. Maybe someone else will come up with a solution that really works.