user626528
user626528

Reputation: 14418

div aligned to the right: incorrect scrollbar

I have the markup like this:

<div id="MainDiv" style="position: fixed; width: 100%; height: 100%;">
    <div id="Log" style="float: right; max-height:100%; overflow: scroll;">
        (some filling text)
    </div>
</div>

It works ok, except the fact that only half of Log's vertical scrollbar is shown (FF, Chrome).
Any ideas how to fix this?

Upvotes: 0

Views: 119

Answers (2)

skparwal
skparwal

Reputation: 1084

You have to set padding to 0 also. different browsers have different settings.

body { margin:0; padding:0; }

Working example: http://jsfiddle.net/Ngkam/

Upvotes: 0

crimson_penguin
crimson_penguin

Reputation: 2778

This is almost definitely because the body has a margin. Remove that and it should work.

body
{
    margin:0;
}

Here's the JS Bin: http://jsbin.com/ajicox/1/

Upvotes: 1

Related Questions