PDA

View Full Version : CSS problem with text overflow



biskelion
01 May 2006, 08:20 PM
ok i have a problem with the text overflow which is this:
<style type="text/css">
div
{
background-color:#00000;
width:125px;
height:150px;
overflow: scroll
}
</style>

-- my problem is that when i do close the tag around my navigation box which i want to be able to scroll it works however it creates another overflow box to the very top of my page! I dont want that box there how do i remove it.. I have no clue what is causing this. Can anybody help me please if you could it would help tons :) cause im tearing my hair out at this..

Wickham
02 May 2006, 08:54 AM
Overflow: scroll works in different ways in various browsers. See
http://www.quirksmode.org/css/overflow.html
and
http://www.x-smiles.org/demo/testsuite/css/overflowscroll.html
However, the way you have it the scroll will apply to all divs which is probably why you are seeing it in another place.
Give the code to a single div class:
in stylesheet or head:
<style>
div
.testscroll
{ background-color:#00000;
width:500px;
height:150px;
overflow: scroll
}
</style>

in the body
<div class="testscroll">Test - add a lot of text here to test the scroll</div>