Hunter Mitchell
Hunter Mitchell

Reputation: 7293

Custom Scrollbar overflow?

I have made a cool looking scrollbar. I can not seem to get this right. I only want the thing to scroll in the y axis. For some reason, it keeps on the x and y. I want to be able to type in as much as i want, and it space down when there is not enough room on the x axis.... http://jsfiddle.net/Hunter4854/VgB2F/ What am i doing wrong, and how do i fix it?

Upvotes: 0

Views: 1156

Answers (2)

Idrizi.A
Idrizi.A

Reputation: 12060

replace in css

.scrollx{
    width: 400px;
    height: 300px; 
    background-color: #2A2A2A; 
    overflow-y:scroll; 
}

with

    .scrollx{
    width: 400px;
    height: 300px; 
    background-color: #2A2A2A; 
    overflow-y:scroll; 
    overflow-x:hidden;
    word-wrap:break-word;
}

http://jsfiddle.net/enve/VgB2F/5/

Upvotes: 1

Thomas Jones
Thomas Jones

Reputation: 4962

you have to have overflow-x:hidden and word-wrap:break-word

http://jsfiddle.net/VgB2F/2/

Upvotes: 1

Related Questions