473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

CSS Help on making Div BGcolor across entire page when scroll bar appears

Hi,

I am using Divs with CSS to setup a layout for a site. I am using the
<Div>s and style sheets below. I want the TopMenu to go across the
entire top of the browser. It does go across the entire top, but let
say my screen resolution is 800x600 and the "Content" Div forces scroll
bars for the user to scroll to the right to see an object then the
TopMenu doesn't go all the way across. The top menu will only go to
the screen resolution, but as soon as I scroll right and go over 600
pixels the color gets cut off. If I specify the width: 100%; or leave
it alone it does the same thing. If I set my screen resolution to 1024
x 768 the Top Menu goes across the entire top perfectly. Since there
is no scroll bar it won't be a problem.
My last question is for the leftPanel how can I make the bgcolor travel
all the way down 100% the height of the browser at all times with a
width of 155px? I have tried setting its height to 100% and that
doesn't work. If I set it to some real high # to like Height: 1000px
it does go all the way down, but I want it to be universial to were it
flows with the height of the browser and if a height scroll bars
appears it will travel down with it to however far it needs to go.

thanks,

David

<form id="form1" runat="server">
<div id="MainDiv">
<div id="TopMenu">
</div>
<div id="LeftPanel">
</div>
<div id="Content">
<IN HERE SOME CONTROL THAT IS MORE THAN 600 PIXELS>
</div>
<div id="rightContent">
</div>

</div>
</form>

CSS Files:
ody
{
margin: 0px;
}

#MainDiv
{

}
#TopMenu
{
height: 20px;
background-color: #a7cfe8;
}

#LeftPanel
{
background-color: #a7cfe8;
position: absolute;
width: 155px;
height: 100%;
top: 20px;
left: 0px;
}

#Content
{
margin-left: 156px;
padding-left: 10px;
padding-top: 10px;
}

#rightContent
{
position: absolute;
right: 0px;
top: 20px;
width: 5px;
}

Aug 4 '06 #1
1 5652
using height=100%, require that the object be inside some content with an
absolute heigth specified. in your case its ignored, and the height is the
content height. you aslo do not set the widths of the content divs, so they
are the size of their content.

you could use client script to set all the sizes correct.

-- bruce (sqlwork.com)
<da****@sharpesoft.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi,

I am using Divs with CSS to setup a layout for a site. I am using the
<Div>s and style sheets below. I want the TopMenu to go across the
entire top of the browser. It does go across the entire top, but let
say my screen resolution is 800x600 and the "Content" Div forces scroll
bars for the user to scroll to the right to see an object then the
TopMenu doesn't go all the way across. The top menu will only go to
the screen resolution, but as soon as I scroll right and go over 600
pixels the color gets cut off. If I specify the width: 100%; or leave
it alone it does the same thing. If I set my screen resolution to 1024
x 768 the Top Menu goes across the entire top perfectly. Since there
is no scroll bar it won't be a problem.
My last question is for the leftPanel how can I make the bgcolor travel
all the way down 100% the height of the browser at all times with a
width of 155px? I have tried setting its height to 100% and that
doesn't work. If I set it to some real high # to like Height: 1000px
it does go all the way down, but I want it to be universial to were it
flows with the height of the browser and if a height scroll bars
appears it will travel down with it to however far it needs to go.

thanks,

David

<form id="form1" runat="server">
<div id="MainDiv">
<div id="TopMenu">
</div>
<div id="LeftPanel">
</div>
<div id="Content">
<IN HERE SOME CONTROL THAT IS MORE THAN 600 PIXELS>
</div>
<div id="rightContent">
</div>

</div>
</form>

CSS Files:
ody
{
margin: 0px;
}

#MainDiv
{

}
#TopMenu
{
height: 20px;
background-color: #a7cfe8;
}

#LeftPanel
{
background-color: #a7cfe8;
position: absolute;
width: 155px;
height: 100%;
top: 20px;
left: 0px;
}

#Content
{
margin-left: 156px;
padding-left: 10px;
padding-top: 10px;
}

#rightContent
{
position: absolute;
right: 0px;
top: 20px;
width: 5px;
}

Aug 4 '06 #2

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

Similar topics

2
by: Tristan Miller | last post by:
Greetings. I have a two-column web layout, where the first column is just the regular body text with a "marign-right" of 16em, and the second column is an "absolute"-positioned div with a width...
1
by: Rune Runnestø | last post by:
Hi, I have made a small program that doesn't work quite the way it should. It is a guestbook for the web, where visitors can write back their greetings. The program consists of 3 files: -...
5
by: Corrine | last post by:
Given a backend on a network server and a frontend on a local computer, when is data pulled across the network? For example, does Rst.Recordcount pull data across the network? How about...
2
by: Michael | last post by:
Need some help trying to read values from web controls - specifically *finding* the controls (like a drop down list) - that are added dynamically added within an asp:panel control. The page...
26
by: meltedown | last post by:
I have 2 left floating divs on a page. Sometime the left side is larger, sometimes the right side is larger. I want the page to have a margin at the bottom of whichever div is the largest. If I...
3
by: laredotornado | last post by:
Hello, Is there any notation that would allow me to write a reference to an HTTPS page without specifying the entire url? For example, right now I have <a href="order_form.html">Order...
2
by: simbarashe | last post by:
Hie Could someone please help me I'm trying to make a back button and I'm trying not to make the button a submit button. The action or the redirection to another page is done using php and my code...
6
by: frankenstein | last post by:
I've not seen any real sollutions to this yet. I found something similar on this forum but the posted sollutions didn't work. I would like to make a drag to scroll for my blog, using JS. So far I...
7
by: chardish | last post by:
Hello, Is it possible to make a div part of the "background"? In other words, I want it to always render if that part of the screen is showing, but not create scrollbars under any circumstances....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.