October 28, 2014 - 9:24pm — Natalila
I'm currently working on a CSS for a friend, but I have one problem I can't seem to fix/ don't know a code which could help me. I have created a box for my current updates, but whenever I type in it, the box gets larger and I want it to stay the size it is ( I mean that I'm trying to get the text scroll down inside the box, but when I scroll it just scrolls the whole page instead of the text in that box.)
Hjelp? ;_;
add "overflow:auto" to your
If you set the height of the
height
property, that will keep it from getting bigger when you fill it with text. More info here.For the scroll bar, you have two options, both use the
overflow
property. One option is to set the value toauto
. If you do that, then a scroll bar will appear whenever there is enough text to fill the box. The other option is to use thescroll
value, which will always have a scroll bar in the box, no matter whether or not it is full of text, but the scroll bar won't work unless it is full. More info here.E: Ninja'd