473,486 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Background Color Issue with Side-by-Side <div>s

Hello!

I am working on revising my Web site template. The main part of the page is
divided into two columns (each a <div>)--a side bar on the left and the main
content area on the right. Both <div>s have a different background color.
The side bar <div> extends partly down the page while the main content area
<div> goes almost all the way down.

The problem I am having is in getting the side bar's background to line up
with the main content area's background. Because the side bar is shorter
than the main content area, it's background color doesn't extend down the
page as far as I would like it.

I found a work-around for in IE 6 and NS 6--setting the container <div>s
background-color. It's NS 7.1 that gives me the problem.

Example:
http://www.bengribaudo.com/dev/Test-bg.htm

Thanks!

Ben Gribaudo
Baltimore, MD - www.bengribaudo.com
Jul 20 '05 #1
5 5294
On Fri, 26 Dec 2003 16:30:13 GMT, "Ben Gribaudo"
<bengribaudoN_O_@_S_P_A_Mverizon.net> wrote:
Hello!

I am working on revising my Web site template. The main part of the page is
divided into two columns (each a <div>)--a side bar on the left and the main
content area on the right. Both <div>s have a different background color.
The side bar <div> extends partly down the page while the main content area
<div> goes almost all the way down.

The problem I am having is in getting the side bar's background to line up
with the main content area's background. Because the side bar is shorter
than the main content area, it's background color doesn't extend down the
page as far as I would like it.

I found a work-around for in IE 6 and NS 6--setting the container <div>s
background-color. It's NS 7.1 that gives me the problem.

Example:
http://www.bengribaudo.com/dev/Test-bg.htm

Thanks!

Ben Gribaudo
Baltimore, MD - www.bengribaudo.com

Looks fine to me with Opera 7.23 - there is a lighter grey left column
with waterfall graphic, and a darker grey right column with text, all
on another grey background? The column colours extend down to the
same level.

Regards, Alex
Jul 20 '05 #2
Alex Bell wrote:
On Fri, 26 Dec 2003 16:30:13 GMT, "Ben Gribaudo"
<bengribaudoN_O_@_S_P_A_Mverizon.net> wrote:

Hello!

I am working on revising my Web site template. The main part of the page is
divided into two columns (each a <div>)--a side bar on the left and the main
content area on the right. Both <div>s have a different background color.
The side bar <div> extends partly down the page while the main content area
<div> goes almost all the way down.

The problem I am having is in getting the side bar's background to line up
with the main content area's background. Because the side bar is shorter
than the main content area, it's background color doesn't extend down the
page as far as I would like it.

I found a work-around for in IE 6 and NS 6--setting the container <div>s
background-color. It's NS 7.1 that gives me the problem.

Example:
http://www.bengribaudo.com/dev/Test-bg.htm

Thanks!

Ben Gribaudo
Baltimore, MD - www.bengribaudo.com


Looks fine to me with Opera 7.23 - there is a lighter grey left column
with waterfall graphic, and a darker grey right column with text, all
on another grey background? The column colours extend down to the
same level.

Regards, Alex


with Mozilla the left col is much shorter than the main text col on the
right. Can't you set them both to the same height ?

--
Bill Drescher
william {at} TechServSys {dot} com

Jul 20 '05 #3

"bill drescher" <no****@Spamcop.net> wrote in message
news:vu************@corp.supernews.com...
with Mozilla the left col is much shorter than the main text col on the
right. Can't you set them both to the same height ?


That is the problem: The height of the column on the right varies from page
to page so it's not practical to give it a fixed height.:-(
Ben :-)
www.bengribaudo.com
Jul 20 '05 #4
Ben Gribaudo wrote:
"bill drescher" <no****@Spamcop.net> wrote in message
news:vu************@corp.supernews.com...
with Mozilla the left col is much shorter than the main text col on the
right. Can't you set them both to the same height ?

That is the problem: The height of the column on the right varies from page
to page so it's not practical to give it a fixed height.:-(
Ben :-)
www.bengribaudo.com

How about (untested !):
make the left div as wide as both divs would be,
position the "right" div inside the left div, but to the right.

then the "left" div would be forced to be as high as the right so as to
enclose it, but it would look as if they were side by side

--
Bill Drescher
william {at} TechServSys {dot} com

Jul 20 '05 #5
Hi Bill,

This is a great idea! It fixed that problem in NS 7.1.

Alas! Now IE 6 and NS 6 don't show it right. For some reason, IE 6 has this
space between the image on the left and the main column. NS 6 displays the
columns one above the other. :-(

Code is at:
http://www.bengribaudo.com/dev/Test2-bg.htm

Any ideas, anyone?

Thanks!

Ben Gribaudo
www.bengribaudo.com
"bill drescher" <no****@Spamcop.net> wrote in message
news:vu************@corp.supernews.com...
Ben Gribaudo wrote:
"bill drescher" <no****@Spamcop.net> wrote in message
news:vu************@corp.supernews.com...
with Mozilla the left col is much shorter than the main text col on the
right. Can't you set them both to the same height ?

That is the problem: The height of the column on the right varies from page to page so it's not practical to give it a fixed height.:-(
Ben :-)
www.bengribaudo.com

How about (untested !):
make the left div as wide as both divs would be,
position the "right" div inside the left div, but to the right.

then the "left" div would be forced to be as high as the right so as to
enclose it, but it would look as if they were side by side

--
Bill Drescher
william {at} TechServSys {dot} com

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3350
by: Dan Diebolt | last post by:
I need some script that change "foo" to "bar" anywhere "foo" occurs on the page once the page is loaded. Any idea how?
5
1220
by: Dré | last post by:
Hi, I'm making a FAQ-page. To keep it a little synoptic, only the questions are visible. When you klick on a certain question, the answer appears. You can find an example at:...
7
6736
by: Eduard Dewolf | last post by:
Hi, Im have been changing my site to make it HTML 4.01 compliant As I should, I wrapped all INPUT tags in blocks I wrapped the not visible INPUT type HIDDEN tags in first PRE, later H6 tags...
2
2416
by: JJ | last post by:
I'm looking to use two div elements to create two columns within a container div element. I'd like the container div to dynamically have a height greater than the internal column with the greatest...
1
1768
by: Silky | last post by:
Iam trying to get the green footer div to sit on the bottom of all three divs so as the divs vary in height it sits off the bottom of the lowest one I cannot use absolutes because the three...
2
5191
by: BrianP | last post by:
Hi, I have had to invent a work-around to get past what looks like a JavaScript bug, the malfunctioning Perl-like JavaScript array functions including SPLICE() and UNSHIFT(). I have boiled it...
40
2447
by: fordge | last post by:
we usually use <<n as a cheaper option to multiplication when its factor of 2^n right, even for non 2^n say ix24 ==> ix(16+8) ==> (i<<4)+(i<<3) similarly divison 2^n is >>n
1
1102
by: Andreas Zita | last post by:
Hi, Im having a hard time converting my old web project to a web site in asp ..net 2.0 Right now the problem is that XslCompiledTransform isn't producing the same result as previously... ...
5
1993
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On...
2
1919
by: MOS1 | last post by:
Folks Please help this is driving me insane The + expands but the minus fails Error src is null or not an object function Win_onLoad() { GetNameAndLink(0); } function GetNameAndLink(pkId)
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.