Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old August 24th, 2007, 08:04 AM   #1
New Member
 

Join Date: Aug 2007
Location: Cornwall UL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 mikep is on a distinguished road
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:
#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:
<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
mikep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 24th, 2007, 08:23 AM   #2
Elite Veteran
 

Join Date: Jan 2007
Location: You know where
Age: 32
Posts: 4,607
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all
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.
karinne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 24th, 2007, 08:40 AM   #3
New Member
 

Join Date: Aug 2007
Location: Cornwall UL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 mikep is on a distinguished road
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
mikep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
css , float , overflow


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
CSS - Margin: Auto; Not working in IE Pheonix HTML, XHTML and CSS 3 March 5th, 2009 07:44 AM
"overflow: hidden" not working on firefox when the div contains flash inside littleshaolin HTML, XHTML and CSS 0 May 21st, 2008 01:27 AM
Problems with float:left float:right nvidiajoe HTML, XHTML and CSS 8 November 17th, 2006 04:24 PM
div overflow help redimp HTML, XHTML and CSS 0 February 3rd, 2006 09:00 AM
overflow auto w/ names links on mac Webforumz Staff HTML, XHTML and CSS 4 August 28th, 2003 07:04 PM


Search Engine Optimization by vBSEO 3.2.0 RC8