Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 1, 2006, 6:55 am
rate this thread
I need to have 3 divs (or table rows) in horizontal aligment , the
first and third should have about 30px and the second(the centre one)
should take the rest of remaining space between them. The example below
is to ilustrate what I want do achieve but the center divs height is
set to 90% which is not very good for every screen size.
<html xmlns="http://www.w3.org/1999/xhtml ">
<body style="height: 100%; margin: 0 0 0 0;">
<form id="form1" runat="server">
<div style="height: 100%; width: 100%; background-color:
<div style="height: 30px; background-color: Aqua; width:
<div style="height: 90%; width: 100%; background-color:
<div style="height: 30px; background-color: Brown; width:
Re: 3 horizontal divs
What you want is impractical. It's barely possible using esoteric css and
convoluted hacks for IE but you should look into a simpler, more stable
layout if you want a page with dependability. Should you wish to pursue
your stated course, you need to put the header and footer in an outer 100%-
height div and position the footer absolutely - at least for IE6.
"Position fixed" might be useful in other browsers.
Infinity has its limits.