Click to See Complete Forum and Search --> : Three columns that don't overlap


IncaWarrior
10-23-2003, 07:26 PM
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.

can anyone help me?

BTW this it not the site in my profile

MotherNatrsSon
10-23-2003, 08:11 PM
Post a link to the page then???

MNS

IncaWarrior
10-23-2003, 08:40 PM
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)

http://www.strategyplanet.com/populous/home.html

PeOfEo
10-23-2003, 09:27 PM
dreamweaver is fine, why would that be an issue? I use it all the time for its intellitext.

IncaWarrior
10-23-2003, 10:17 PM
well it doesn't handle DIV's too nicely and he just had tables within tables within tables

pyro
10-24-2003, 07:08 AM
Originally posted by IncaWarrior
well it doesn't handle DIV's too nicely and he just had tables within tables within tables Dreamweaver MX 2004 does... :)

gizmo
10-24-2003, 02:29 PM
Have a look at http://www.inknoise.com/experimental/layoutomatic.php for a start. I am sure that this has appeared before on this forum with another useful link. I will have a search around

IncaWarrior
10-24-2003, 02:44 PM
well i don't have dreamweaver 2004 :(

that's not quite what i want, since i would like to have it stratch to the page as well

IncaWarrior
10-25-2003, 04:48 PM
so is it impossible?

is there any way to push things to the right so much that they're off the page?

i figured out how to do it with a table in the DIV:
<div align="right"><table width="1000"><tr><td></td><td align="right">

there must be a better way

PeOfEo
10-25-2003, 11:35 PM
Just use div min width and use relative positioning from the left side of the page to right right i guess.

nkaisare
10-26-2003, 01:26 AM
<div id="main">...</div>
<div id="leftedge">...</div>
<div id="rightedge">...</div>

#main {margin-left: 150px; width: 700px; padding: 0}
#leftedge {position: absolute; top: 0; left: 0; width: 150px; padding: 0}
#rightedge {position: absolute; top: 0; left: 850px; width: 150px; padding: 0}

If you want padding (and/or borders), use box model hack (http://css-discuss.incutio.com/?page=BoxModelHack):
div#leftedge {position: absolute; top: 0; left: 0; width: 140px; padding: 5px}
div#leftedge {
\width: 150px; /* Feed to IE 5.x */
w\idth: 140px; /* Feed to good browsers */
}

---
<div align="right"><table width="1000"><tr><td></td><td align="right">

Whats that supposed to do? Right-align something? How about:
body {width: 1000px; text-align: right}

PeOfEo
10-26-2003, 01:29 AM
just on a side note the align attribute is not even valid html 4.01.

IncaWarrior
10-26-2003, 10:29 AM
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

nkaisare
10-26-2003, 02:01 PM
Originally posted by IncaWarrior
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
I presume this is in reply to my post above.

If you want your left and right divs to touch the screen edges, use:
#left{position: absolute; left: 0; top: 0; padding-left: 0; margin-left: 0; width: 150px;}
#right{position: absolute; right: 0; top: 0; padding-left: 0; margin-left: 0; width: 150px;}
#middle{margin: 0 150px}

If you want your layout to be of a certain minimum width, use:
body {min-width: 800px}

Notes:
1. Use box-model hacks to make this work in IE5.
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:
http://www.saila.com/usage/layouts/saila_layout.html

Hope this helps
Niket

IncaWarrior
10-26-2003, 04:35 PM
the right div i want to go past the screen edge in cases where the viewer has a very small window

nkaisare
10-26-2003, 08:59 PM
Use min-width for the body to get that right.

Use Saila's example to make it work in IE. Else google search for "min-width in IE" or something like that.

IncaWarrior
10-27-2003, 04:55 PM
ooh that's just what i've been looking for- woohoo!

IncaWarrior
10-27-2003, 09:46 PM
ah i got it!


#right {
position:absolute;
top: 300px;
width:100%;
text-align:right;
}

#rightin {
padding-left: 850px;
}

...
<div id="right">
<div id="rightin">
...
</div
</div>