Как сделать так, чтобы содержимое фиксированного элемента прокручивалось только тогда, когда оно превышает высоту областCSS

Разбираемся в CSS
Ответить
Anonymous
 Как сделать так, чтобы содержимое фиксированного элемента прокручивалось только тогда, когда оно превышает высоту област

Сообщение Anonymous »


У меня есть positioned on the left side of a web page, containing menu and navigation links. It has no height set from css, the content determines the height, the width is fixed. The problem is that if the content is too much, the will be larger than the window's height, and part of the content will not be visible. (Scrolling the window doesn't help, since the position is and the won't scroll.)

I tried to set

Код: Выделить всё

overflow-y:auto;
but that doesn't help either, the div doesn't seem to notice that part of it is outside of the window.

How can I make it's contents scrollable only, if needed, if the hangs out of the window?


Источник: https://stackoverflow.com/questions/188 ... -exceeds-t
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»