M.Svrcek
M.Svrcek

Reputation: 5645

No scroll bar in firefox

I'm trying to create basic admin interface for my app where everything should be display all the time except one div, block, should be scrollable when overflowed

Here's html:

<div class="all">
    <div class="header">
        <div class="logo">a</div>
        <div class="body">b</div>
    </div>
    <div class="content">
        <div class="left">c</div>
        <div class="right">
            <div class="block">
                <div class="one">A</div>
                <div class="two">B</div>
                <div class="three">C</div>
            </div>
        </div>
    </div>
</div>

and css:

    body
    {
        position:fixed; 
        top:0px; 
        left:0px;
        bottom:0px; 
        right:0px;  
        margin:0px;
    }

    .all
    {
        position: relative;
        display: table;
        width: 100%;
        height: 100%;
    }
    .header
    {
        display: table-row;
        position: relative;
        height: 50px;
    }

    .header .logo
    {
        position: relative;
        display: table-cell;
        background-color: red;

    }

    .header .body
    {
        position: relative;
        display: table-cell;
        background-color: yellow;
    }

    .content
    {
        position: relative;
        display: table-row;
    }
    .content .left
    {
        position: relative;
        display: table-cell;
        height: 100%;
        width: 150px;
        background-color: green;
    }
    .content .right
    {
        position: relative;
        display: table-cell;
        height: 100%;
        background-color: blue;
    }
    .block
    {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
        overflow-y: scroll;
    }

    .one, .two, .three
    {
        border: 1px solid black;
        height: 500px;
    }
    .one
    {
        background-color: aliceblue;
    }
    .two
    {
        background-color: aqua;
    }
    .three
    {
        background-color: brown;
    }

I encoutred one problem, in IE, Chrome i see scrollbar, but not in Firefox. I created JS fiddle, so you can see:

Link

Can someone help me?

Upvotes: 1

Views: 489

Answers (1)

Crazy Programmer
Crazy Programmer

Reputation: 196

Changing to position:absolute on block class does solves the problem you can have a look at this fiddle

Upvotes: 2

Related Questions