overflow:auto not working within float

This is a discussion on "overflow:auto not working within float" within the Web Page Design section. This forum, and the thread "overflow:auto not working within float are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 24th, 2007, 12:04
New Member
Join Date: Aug 2007
Location: Cornwall UL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
overflow:auto not working within float

Hi, I hope that you guys might be able to help me with this. I have a fixed size content box which is positioned using a float and has overflow: auto. The css is:
Code: Select all
#transbox {
 float: right;
 /*position: relative;
 left: 350px;
 top: -110px;*/
 width: 280px;
height: 300px;
 margin: 14px;
 background-color: #fff;
 border: 2px solid black;
 filter:alpha(opacity=70);
 opacity: 0.7;
 -moz-opacity:0.7;
 overflow: auto;
}
#transbox div {
 padding: 5px 15px 15px 15px;
 color: #000;
 filter:alpha(opacity=100);
 opacity: 1;
 -moz-opacity:1;
 position: relative;
}
and the html:
Code: Select all
<div id="transbox">
 <div>
   <h3>about lorem</h3>
   <p>
   Lorem ipsum dolor sit amet, consectetur dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in <a href="index.cfm?action=public.contact">culpa</a> qui officia deserunt mollit anim id est laborum.
   </p>
   <p>
   Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in <a href="index.cfm?action=public.contact">culpa</a> qui officia deserunt mollit anim id est laborum.
   </p>
 </div>
</div>
The problem is only with IE, as it appears to be working as expected in Firefox. What is happening is that in IE the browser recognises that the text is overflowing and adds the scroll bar, but the text just gets displayed anyway.
Odd thing is that if I remove the float and position it relatively, it seems to work ok in IE.
To see it in action please see http://www.geosend.com/nm/index.cfm?action=public.about.
Any help with this would be appreciated.
Mike
Reply With Quote

  #2 (permalink)  
Old Aug 24th, 2007, 12:23
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: overflow:auto not working within float

It's the <div> inside the <div id="transbox"> that screwing everything up ... you don't need it anyways.
Reply With Quote
  #3 (permalink)  
Old Aug 24th, 2007, 12:40
New Member
Join Date: Aug 2007
Location: Cornwall UL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: overflow:auto not working within float

Thanks for replying so quickly. It seems you are correct, so i've removed the inner div and added the padding and color items to the #transbox div and it all seems to work great now.

Many thanks, Mike
Reply With Quote
Reply

Tags
css, float, overflow

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
"overflow: hidden" not working on firefox when the div contains flash inside littleshaolin Web Page Design 0 May 21st, 2008 05:27
Problems with float:left float:right nvidiajoe Web Page Design 8 Nov 17th, 2006 20:24
CSS - Margin: Auto; Not working in IE Pheonix Web Page Design 2 Feb 11th, 2006 22:34
div overflow help redimp Web Page Design 0 Feb 3rd, 2006 13:00
overflow auto w/ names links on mac Webforumz Staff Web Page Design 4 Aug 28th, 2003 23:04


All times are GMT. The time now is 07:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43