Three columns that don't overlap

liunx

Guest
I'm trying to make a site with three columns that doesn't have any thing overlapping. If the user visits with a smaller browser i would prefer that there be a bottom scrollbar then my page being distorted. I can get everything layed out right (with absolute positioning and such) but two of my div's overlap when you view on a small page.<br />
<br />
can anyone help me?<br />
<br />
BTW this it not the site in my profile<!--content-->Post a link to the page then???<br />
<br />
MNS<!--content-->i don't have the new site, but here's the old site which i started to change some before deciding to start fresh (i took over the site from the previous person who liked dreamweaver)<br />
<br />
<!-- m --><a class="postlink" href="http://www.strategyplanet.com/populous/home.html">http://www.strategyplanet.com/populous/home.html</a><!-- m --><!--content-->dreamweaver is fine, why would that be an issue? I use it all the time for its intellitext.<!--content-->well it doesn't handle DIV's too nicely and he just had tables within tables within tables<!--content-->Originally posted by IncaWarrior <br />
well it doesn't handle DIV's too nicely and he just had tables within tables within tables Dreamweaver MX 2004 does... :)<!--content-->Have a look at <!-- m --><a class="postlink" href="http://www.inknoise.com/experimental/layoutomatic.php">http://www.inknoise.com/experimental/layoutomatic.php</a><!-- m --> for a start. I am sure that this has appeared before on this forum with another useful link. I will have a search around<!--content-->well i don't have dreamweaver 2004 :(<br />
<br />
that's not quite what i want, since i would like to have it stratch to the page as well<!--content-->so is it impossible?<br />
<br />
is there any way to push things to the right so much that they're off the page?<br />
<br />
i figured out how to do it with a table in the DIV:<br />
<div align="right"><table width="1000"><tr><td></td><td align="right"><br />
<br />
there must be a better way<!--content-->Just use div min width and use relative positioning from the left side of the page to right right i guess.<!--content--><div id="main">...</div><br />
<div id="leftedge">...</div><br />
<div id="rightedge">...</div><br />
<br />
#main {margin-left: 150px; width: 700px; padding: 0}<br />
#leftedge {position: absolute; top: 0; left: 0; width: 150px; padding: 0}<br />
#rightedge {position: absolute; top: 0; left: 850px; width: 150px; padding: 0}<br />
<br />
If you want padding (and/or borders), use box model hack (<!-- m --><a class="postlink" href="http://css-discuss.incutio.com/?page=BoxModelHack">http://css-discuss.incutio.com/?page=BoxModelHack</a><!-- m -->):<br />
div#leftedge {position: absolute; top: 0; left: 0; width: 140px; padding: 5px}<br />
div#leftedge {<br />
\width: 150px; /* Feed to IE 5.x */<br />
w\idth: 140px; /* Feed to good browsers */<br />
}<br />
<br />
---<br />
<div align="right"><table width="1000"><tr><td></td><td align="right"><br />
<br />
Whats that supposed to do? Right-align something? How about:<br />
body {width: 1000px; text-align: right}<!--content-->just on a side note the align attribute is not even valid html 4.01.<!--content-->hmm some of those look good. the right one won't work though because i need it to follow the edge of the screen if it's bigger<!--content-->Originally posted by IncaWarrior <br />
hmm some of those look good. the right one won't work though because i need it to follow the edge of the screen if it's bigger <br />
I presume this is in reply to my post above.<br />
<br />
If you want your left and right divs to touch the screen edges, use:<br />
#left{position: absolute; left: 0; top: 0; padding-left: 0; margin-left: 0; width: 150px;}<br />
#right{position: absolute; right: 0; top: 0; padding-left: 0; margin-left: 0; width: 150px;}<br />
#middle{margin: 0 150px}<br />
<br />
If you want your layout to be of a certain minimum width, use:<br />
body {min-width: 800px}<br />
<br />
Notes:<br />
1. Use box-model hacks to make this work in IE5.<br />
2. min-width is not supported by IE. If you want to support that in IE, and if you want to support v4 browsers, you will have to put in more work. Salia's 3-column layout is a great starting point:<br />
<!-- m --><a class="postlink" href="http://www.saila.com/usage/layouts/saila_layout.html">http://www.saila.com/usage/layouts/saila_layout.html</a><!-- m --><br />
<br />
Hope this helps<br />
Niket<!--content-->the right div i want to go past the screen edge in cases where the viewer has a very small window<!--content-->Use min-width for the body to get that right.<br />
<br />
Use Saila's example to make it work in IE. Else google search for "min-width in IE" or something like that.<!--content-->ooh that's just what i've been looking for- woohoo!<!--content-->ah i got it!<br />
<br />
<br />
#right {<br />
position:absolute;<br />
top: 300px;<br />
width:100%;<br />
text-align:right;<br />
}<br />
<br />
#rightin {<br />
padding-left: 850px;<br />
}<br />
<br />
...<br />
<div id="right"><br />
<div id="rightin"><br />
...<br />
</div<br />
</div><!--content-->
 
Back
Top