Brett
Brett

Reputation: 441

how t put scroll after a certain pixel of a div

Hey I have a DIV with width 1600 px. Now I want to add a functionality inside DIV thats fixed my first 200px and automatically add a scroll for rest of the part.

Is it possible using any css tricks or jquery.. pleae help

Upvotes: 0

Views: 44

Answers (1)

Guruprasad J Rao
Guruprasad J Rao

Reputation: 29683

Something like this??

FIDDLE

.firstDiv
{
    width:1200px;
}
.fixedDiv
{
    width:200px;
    position:fixed;
    background:white;
    left:0px;
    height:200px;
}
<div class="firstDiv">
    <div class="fixedDiv">Fixed Content here</div>
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents ScrollableRemaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents ScrollableRemaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
    Remaining contents Scrollable Remaining contents Scrollable Remaining contents ScrollableRemaining contents Scrollable Remaining contents Scrollable Remaining contents Scrollable
</div>

Upvotes: 1

Related Questions