Monday, 15 March 2010

html - Set content box 100% high but if the content only a few lins then without scrolling -



html - Set content box 100% high but if the content only a few lins then without scrolling -

i have 5 div boxes: wrapper, header, navigation, content-title, content. header , navigation has fixed high , content should on rest of website (to bottom). problem vertical scrollbar everytime exist. happens if content has few lines text.

i want scrollbar appears if content content div long website.

demo:

1). website few words: http://projekt-pythorion.de/test/index.php

2). website many words: http://projekt-pythorion.de/test/index_manywords.php

1 = not right because dont want scroll bar because text not long want content div goes bottom of webpage.

2 = right because text long , can scroll down.

i'm not sure understood question. but, if need scroll appear if content larger container, looking overflow: auto.

here's illustration showing working: http://jsfiddle.net/tnh9m/

edit

now updated question it's possible see issue. remove height: 100% #content_box_background, it's making document body overflow... if want go bottom of page, have calculate 100% height, minus top offset setting, height: calc(100% - 400px);

html css height overflow containers

No comments:

Post a Comment