PC Review


Reply
Thread Tools Rate Thread

100% Panel Width Problem

 
 
ATR2000
Guest
Posts: n/a
 
      4th Aug 2008
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


 
Reply With Quote
 
 
 
 
ATR2000
Guest
Posts: n/a
 
      4th Aug 2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
 
ATR2000
Guest
Posts: n/a
 
      4th Aug 2008
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" <(E-Mail Removed)> wrote in message
news:O$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Panel width David C Microsoft ASP .NET 2 15th Jul 2009 08:59 PM
¿ Usable Width of a Panel, i.e. Panel.Width - VerticalScrollBar.Width ? eBob.com Microsoft VB .NET 2 16th Apr 2009 07:03 PM
panel width Guy Cohen Microsoft ASP .NET 1 17th Dec 2006 08:05 AM
ComboBox's popup panel's width problem Lloyd Dupont Microsoft Dot NET Framework Forms 2 23rd Oct 2005 10:05 PM
Changing Panel Width Mariame Microsoft ASP .NET 1 22nd Jul 2004 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:41 AM.