473,394 Members | 1,769 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,394 software developers and data experts.

100% Panel Width Problem

I have setup a Panel to have a width of 100% so that it will adjust to users
screensize. Within the panel I have a table. Unfortunately the table holds
a lot of data and exceeds the size of the screen. The panel has a height of
350px and the scrollbar is set to auto so that both scrollbars appear when
needed. What is happening is that due to the table exceeding the width of
the screen the panel is also enlarging its width larger than the screen and
matching that of the table. I want the panel to stay at the 100% width of
the screen and then if the table exceeds the width then the horizontal
scrollbar appears on the panel.

I know horizontal scrollbars are a bad idea. Unfortunately, I don't have a
choice. :-(

Any ideas? Thanx in advance.

ATR2000
Aug 4 '08 #1
2 9400
Ok, here is some more information that I discovered.

When the DIV statement is within a table like the following, it fails:

<table>
<tr>
<td>
<div style="overflow: auto; width: 100%; height: 350px;
background: #00FF00; position: relative; white-space:nowrap;">
<div>
<table>
<tr>
ETC...

If I place the DIV tag at the root of the BODY tag then it works fine.

Any thoughts as to why it does that? I need to have this content reside
within a table due to design layout.

ATR2000

"ATR2000" <so*****@microsoft.comwrote in message
news:ea**************@TK2MSFTNGP05.phx.gbl...
>I have setup a Panel to have a width of 100% so that it will adjust to
users screensize. Within the panel I have a table. Unfortunately the
table holds a lot of data and exceeds the size of the screen. The panel
has a height of 350px and the scrollbar is set to auto so that both
scrollbars appear when needed. What is happening is that due to the table
exceeding the width of the screen the panel is also enlarging its width
larger than the screen and matching that of the table. I want the panel to
stay at the 100% width of the screen and then if the table exceeds the
width then the horizontal scrollbar appears on the panel.

I know horizontal scrollbars are a bad idea. Unfortunately, I don't have
a choice. :-(

Any ideas? Thanx in advance.

ATR2000

Aug 4 '08 #2
I figured it out. Once I implemented the following style within the table
tag it worked.

<table style="overflow:hidden; table-layout:fixed; position:relative;
width:100%;">
<tr>
<td>
<div style="overflow: auto; width: 100%; height: 350px;
background: #00FF00; position: relative; white-space:nowrap;">
<div>
<table>
<tr>
ETC...

Thanx,

ATR2000
"ATR2000" <so*****@microsoft.comwrote in message
news:O$**************@TK2MSFTNGP04.phx.gbl...
Ok, here is some more information that I discovered.

When the DIV statement is within a table like the following, it fails:

<table>
<tr>
<td>
<div style="overflow: auto; width: 100%; height: 350px;
background: #00FF00; position: relative; white-space:nowrap;">
<div>
<table>
<tr>
ETC...

If I place the DIV tag at the root of the BODY tag then it works fine.

Any thoughts as to why it does that? I need to have this content reside
within a table due to design layout.

ATR2000

"ATR2000" <so*****@microsoft.comwrote in message
news:ea**************@TK2MSFTNGP05.phx.gbl...
>>I have setup a Panel to have a width of 100% so that it will adjust to
users screensize. Within the panel I have a table. Unfortunately the
table holds a lot of data and exceeds the size of the screen. The panel
has a height of 350px and the scrollbar is set to auto so that both
scrollbars appear when needed. What is happening is that due to the table
exceeding the width of the screen the panel is also enlarging its width
larger than the screen and matching that of the table. I want the panel
to stay at the 100% width of the screen and then if the table exceeds the
width then the horizontal scrollbar appears on the panel.

I know horizontal scrollbars are a bad idea. Unfortunately, I don't have
a choice. :-(

Any ideas? Thanx in advance.

ATR2000


Aug 4 '08 #3

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

Similar topics

8
by: BiNZGi | last post by:
Hi I have reduced the problem to this code: <form> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td><input type="text" style="width: 100%;" value="Lorem ipsum dolor...
1
by: Mariame | last post by:
Hi All, How to change a panel width to be equal the Web page width when the page is resizable? Regards
3
by: dba56 | last post by:
I have a panel containing textboxes and buttons which I use as a header for a datagrid on a webform. I would like the panel width to match the datagrid width. The datagrid width grows depending...
1
by: Gary Coutts | last post by:
Hi, I am trying to center an panel using the following: <asp:Panel id="pnltest" HorizontalAlign="Center" BackColor="white" Width="800" Runat="server"> <asp:Button id=btnTest Runat="server"...
2
by: Burstock | last post by:
I have a page that uses a Panel server control with a vertical scroll bar. It is in a table on the page that uses a Master page for it basic layout. Occasionally, when the page displays in IE (not...
1
by: Guy Cohen | last post by:
Hi all I have a simple one (I think) I put a panel on the page. I would like the panel to take the maximum width it can. I deleted the width="x" but that did not help. How do I? TIA
4
by: fjm | last post by:
Hello everyone, I have a question regarding css where I would like to know if it is possible to break up a page into thirds for the height. I need to have a page that will be 100% in height and...
1
pradeepjain
by: pradeepjain | last post by:
I have a 3 column layout left<->content<->right<->.I made a css and html in such a manner that when there is no left sidebar the content region starts from left side and takes whole width of left on...
2
dlite922
by: dlite922 | last post by:
Before you baulk at yet another min-width problem, hear me out. I've been googling for a good hour now and experimenting but at no avail. I have a horizontal UL/LI menu and I want the li width to...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.