Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

overflow part of content to the left side?

Question posted by: Zhang Weiwu (Guest) on June 27th, 2008 07:19 PM
Dear all

I got the following HTML:
<div id="div1" style="width: 100%; overflow: hidden;">
<table>...</table>
</div>

The table element is controlled by javascript and grows by width during
user interaction. I wonder if it is possible to set CSS so that when the
table grows wider than the containing div, the left side flows out of
the containing <divrather than the right side.

Is it possible? Or must it be done with javascript?

I made two picture to show what I mean. But even if the two pictures
together is still less than 8KB, probably this group in general prefer
not to accept attachments, thus here I ask should I post attached pictures?
Ben C's Avatar
Ben C
Guest
n/a Posts
June 27th, 2008
07:19 PM
#2

Re: overflow part of content to the left side?
On 2008-06-05, Zhang Weiwu <zhangweiwu@realss.comwrote:
Quote:
Dear all
>
I got the following HTML:
><div id="div1" style="width: 100%; overflow: hidden;">
><table>...</table>
></div>
>
The table element is controlled by javascript and grows by width during
user interaction. I wonder if it is possible to set CSS so that when the
table grows wider than the containing div, the left side flows out of
the containing <divrather than the right side.


Yes it's possible. direction: rtl on the table should do it (but that
doesn't work properly in many browsers). Better make the table float:
right.

You probably don't need width: 100% on the containing div.

[...]
Quote:
I made two picture to show what I mean. But even if the two pictures
together is still less than 8KB, probably this group in general prefer
not to accept attachments, thus here I ask should I post attached pictures?


Post urls, never attach.

Blinky the Shark's Avatar
Blinky the Shark
Guest
n/a Posts
June 27th, 2008
07:19 PM
#3

Re: overflow part of content to the left side?
Zhang Weiwu wrote:
Quote:
Dear all
>
I got the following HTML:
<div id="div1" style="width: 100%; overflow: hidden;"<table>...</table>
</div>
>
The table element is controlled by javascript and grows by width during
user interaction. I wonder if it is possible to set CSS so that when the
table grows wider than the containing div, the left side flows out of the
containing <divrather than the right side.
>
Is it possible? Or must it be done with javascript?
>
I made two picture to show what I mean. But even if the two pictures
together is still less than 8KB, probably this group in general prefer not
to accept attachments, thus here I ask should I post attached pictures?


Even if the group in general did not want attachments, many servers will
strip them from text groups. Text groups. Text. Simple.


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project -- http://improve-usenet.org
Found 5/08: a free GG-blocking news *feed* -- http://usenet4all.se


Zhang Weiwu's Avatar
Zhang Weiwu
Guest
n/a Posts
June 27th, 2008
07:19 PM
#4

Re: overflow part of content to the left side?
Ben C wrote:
Quote:
On 2008-06-05, Zhang Weiwu <zhangweiwu@realss.comwrote:
Quote:
>Dear all
>>
>I got the following HTML:
><div id="div1" style="width: 100%; overflow: hidden;">
><table>...</table>
></div>
>>
>The table element is controlled by javascript and grows by width during
>user interaction. I wonder if it is possible to set CSS so that when the
>table grows wider than the containing div, the left side flows out of
>the containing <divrather than the right side.

>
Yes it's possible. direction: rtl on the table should do it (but that
doesn't work properly in many browsers). Better make the table float:
right.


Thanks. A float: right set it right on the right.
Quote:
You probably don't need width: 100% on the containing div.


Oh I need it because the initial table width was only 50% of the
viewport, it grows later. But the original table width sets the
containing <divwidth.

 
Not the answer you were looking for? Post your question . . .
189,939 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors