S
S
Snowindy2011-02-18 13:48:18
css
Snowindy, 2011-02-18 13:48:18

Layout: scroll content in a rubber block with a width of 100%?

Good afternoon!
It is necessary to make a rubber block with a scroll so that for any window size it is equal in width to the parent element and contains larger content. Viewing this content is by scrolling.
scroll-mock_Page_1.png
I know that you can put a js-handler on onResize, but I think there is also a css-way ...
Please tell me how can I do this?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Sergey Ermakov, 2011-02-18
@Snowwindy

<div class="container">
<div class="container-content">здесь контент шириной 100500px</div>
</div>
<style type="text/css">
div.container {overflow-x:auto;overflow-y:hidden;}
div.container-content {width:100500px;}
</style>

C
carbonariy, 2011-02-18
@carbonariy

overflow: scroll won't work?

T
Tvarb, 2011-02-18
@Tvarb

www.quirksmode.org/mobile/viewports.html

V
vanxant, 2011-02-18
@vanxant

See how it's done here:
lisikhinadaria.com/style

T
Tvarb, 2011-02-18
@Tvarb

read about viewport, it seems to you to drip in this direction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question