Forum Moderators: not2easy

Message Too Old, No Replies

text overflowing out of div in IE

overflow:auto not working in explorer

         

maree_dw

10:56 pm on Sep 11, 2008 (gmt 0)

10+ Year Member



Hi All,

I have a div floating right within a wrapper which has a style of overflow:auto.

This is working well in firefox & safari but isnt working in ie6 or ie7 - the background pic stays in position but the text flows downwards outside of the div.

I did inititally have a problem with an unwanted scroll bar appearing at the bottom of the div in IE but have since fixed this with a overflow-x:hidden style.

Here is my css:

#content_treatments {
width:490px;
height:560px;
overflow-x:hidden;
overflow-y:auto;
background: url(images/pic_treatments.jpg);
background-repeat:no-repeat;
font-family:"Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-weight:normal;
font-size:11px;
color:#4c517f;
padding:20px 130px 20px 120px;
margin-left:10px;
margin-top:10px;
float:right;
}

Thanks in advance!

Marshall

6:01 am on Sep 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



By setting the height of the <div> to a fixed amount, any text that exceeds that amount will flow outside of it. Either eliminate the height: 560px or set it to height: 100%.

Marshall

maree_dw

11:27 pm on Sep 17, 2008 (gmt 0)

10+ Year Member



Hi Marshall,

Nope - that didnt work. However i have fixed the problem in IE7 by adding this style to an conditional comment css file:

background-position:top right;

But it doesnt work for IE6..

Any ideas?

Cheers.