CSS - Nested Overflow Setting For Great Scrolling Justice
Fun title
anyway - pretty straight forward question : essentially i have 2 divs, we'll say Div A and div B -- now heres their relation : Code: <div id="a"> <div id="b"> </div> </div> ===== css info : /*DIV A*/ #pageContent { position : absolute; display : block; top : 6.75em; left : 38em; width : 340px; overflow: hidden; height : 19em; z-index: 2; font-family :arial; font-size : 12px; color : #c8c8c8; } /* DIV B */ #scrollo { overflow: scroll; width : 150px; height : 150px; margin: .1cm; z-index: 1; font-family :arial; font-size : 12px; color : #c8c8c8; } in my CSS file, DIV A has a specific Width / Height set -- AND -- an "overflow" setting of "hidden" ( aka hides anything that exceeds its boundries - obviously. ) DIV B has it's overflow set to "scroll" OK WHY ? essentially I wish to hide the horizontal scroll bar (since its of no use). THE CATCH 22 : Safari : This works fine. FireFox 1.5.x : Horizontal Scroll bar is still displayed. 3 cheers for standards right? Anyway - I was curious if anyone has encounted this, and if so, knows a work around . Thanks ! edit: The child being Z-indexed lowwer then the parent was just a "logic attempt" on my part - it does not change the outcome if its zindexed to the same or high lever. Similar TutorialsHi, I think this might requiere an IE hack buti have nested divs inside a div on http://gohedonist.com/mempage.php?id=19 but for some reason instead of the divs bein constainted inide the larger div they go all the way down the screen. This is works fine in FF. The problem is located at http://gohedonist.com/mempage.php?id=19 (select Submissions from the dropdown box on the right). Thanks for any help in advance. Hi - I'm working on a page with what I think should be a relatively simple CSS layout. Basically, I have a table on the top half of the page (it displays an address book). The table has a <thead> and <tbody>, and the <tbody> is set to overflow: auto, to give me a scrollbar when its contents gets too big. The bottom half of the page uses AJAX to fetch an entry from the address book, and display more details. It too uses overflow: auto to show scroll bars when necessary. Each element is in a <div>, and I used height: 45% (or so) on each to try to make the whole thing fit on one page, so that there is no whole-page vertical scrolling. An example of the code I'm working with can be found at http://kc9ddi.us/ex.html . My design is working nicely in Firefox, but not IE. IE does not seem to do the right thing with the height: attribute in CSS, so their is no scroll bars in the individual parts of the page, like I want. Can anyone offer any advice here? I'm having a little trouble with the Overflow attribute on my side scrolling website. I have uploaded 2 versions one and two of the same site, one with
Code: overflow:hidden; overflow-x:visible; and one with just. Code: overflow:hidden; the first one is completely static in safari and won't scroll at all but scrolls really nicely in firefox (with a scroll wheel as there are no scroll bars). The second one has a horizontal scroll bar but goes really wierd and starts scrolling horizontally as well which I don't want to happen as it messes up my site. Is there a way to get the site to scroll horizontally without scrolling vertically? I have tried it both this way and by only using Code: overflow-y:hidden; but it has similar results. Any help on this would be greatly appreciated Hi, I have faced a strange issue with the CSS overflow property while using nested DIVs.The DIV with class main has the DIV main-1a as its child which in turn has the DIV with class main-1a-child as its child. As the height of main is not fixed, so it is supposed to increase with main-1a and main-1a-child. But in Mozila FireFox, the height of main is not getting increased with the child DIVs. When the overflow property is set to hidden in main, then only the height of main gets increased with its childs. The issue is fine in IE6 regardless of the overflow property. Any help/explanation in this regard will be very helpful. <html> <head> <title>My Page</title> <style type="text/css"> .main { position:relative; width:800px; display:block; border:1px solid #000000; margin:auto; padding:10px 10px 10px 10px; background:#BABB99; height:100%; overflow:hidden; } .main-1a { width:780px; float:left; background:#FFFFFF; border:1px solid #FF0000; padding:10px 10px 10px 10px; } .main-1a-child { width:760px; float:left; border:1px solid #000000; padding:10px 10px 10px 10px; background:#BABB99; } </style> </head> <body> <div class="main"> <div class="main-1a"> <div class="main-1a-child"> <p>text of div1 a2</p> <p>snkjkjsd</p> <p>snkjkjsd</p> <p>snkjkjsd</p> </div> </div> </div> </body> </html> My CSS works in IE and Mozilla but not Netscape or Opera I have a 2 column website, built with 2 relative position DIVs, with overflow set to auto. Because of this, I turned off overflow on the body tag and on the html tag (overflow: hidden;). I didn't want to have 2 scroll bars on the right side of the window. When I first tested this on 4 browsers, IE, Mozilla, Netscape and Opera, it worked great, only having one scroll bar on the right side of the window when the page was longer than the window height. But when I moved to a new host server recently, I discovered that Netscape and Opera stopped working. They now simply give me blank screens. When I remove the "overflow: hidden;" specifications from the body tag and the HTML tag in my CSS file, Netscape and Opera once again display my web pages. However, now I get 2 scrollbars on the right side of all 4 browsers (in IE, the second scrollbar isn't actually there, but the space holder for the scrollbar is there). Is there a cross browser way for doing what I'm trying to do? Or am I faced with detecting the browser type on the server-side, and setting the style sheet appropriately? Here are the related parts of my CSS: /* CSS styles */ BODY { font-family : Verdana, Arial, Helvetica, sans-serif ; font-size : 10pt; background : Black; color : White; margin: 0; padding: 0; border-width: 0; overflow: hidden; } HTML { overflow: hidden; } #LeftNavDIV { position:relative; width:185px; height:100%; float:left; padding:2px 0px 0px 0px; margin:0px 0px 0px 0px; border:1px solid white; overflow:auto; } #ContentDIV { position:relative; height:100%; width:75%; float:right; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; border:0px dashed #336699; overflow:auto; } Hi, Here's my demo site: http://www.alpha-dreams.com/demo5/ Why is IE 7 off? I've looked everywhere. Do I need a stylesheet for IE 7? Thanks Haven't checked on IE for Windows, but here are my issues on the mac: my list items Elixir Volume 1, 2, etc are not left-aligned in IE and I cannot figure out why! my arrow list image is not showing up in IE the signup form fields are not formatted properly in IE. they look fine in Firefox though. the url: http://www . nectardesign . com the source code: Code: <td valign="top" align="left" width="230"> <span class="hometext"><b>RECENT ELIXIR NEWSLETTERS</b></span><br /><br /> <span class="hometext"><ul><li><a href="/blog/2008/04/04/elixir" rel="bookmark" title="Elixir (Volume 1, Issue 3)">Elixir (Volume 1, Issue 3)</a><br />Going with the Lateral Flow...</li><li><a href="/blog/2008/03/19/ekuxur-volume1-issue-2" rel="bookmark" title="Elixir (volume1, Issue 2)">Elixir (volume1, Issue 2)</a><br />Chilling for Recovery...</li><li><a href="/blog/2008/03/05/39" rel="bookmark" title="Elixir (volume1, Issue 1)">Elixir (volume1, Issue 1)</a><br />Making Children Healthier with Design...</li></ul></span> <span class="hometext">Receive our monthly design-industry newsletter <a href="http://www.nectardesign.com/blog/index.php?s=elixir">Elixir</a> via email:</span><br /> <div class="ddfmwrap"><form class="ddfm" method="post" action="http://www.nectardesign.com/" enctype="multipart/form-data"> <p class="fieldwrap"><label for="fm_name">Name</label><input class="fmtext" type="text" name="fm_name" id="fm_name" value="" /></p> <p class="fieldwrap"><label for="fm_email">Email</label><input class="fmtext" type="text" name="fm_email" id="fm_email" value="" /></p> <p><input type="hidden" name="MAX_FILE_SIZE" value="1000000" /></p> <div class="submit"><input type="submit" name="form_submitted" value="Join List" /></div> </form></div> and the css: Code: .hometext { font-size: 12px; /*width: 230px;*/ letter-spacing:.02em; padding: 0 10px 0 0px; background: #fff; color: #7F7F7F; text-align: left; } .hometext a { color: #FE6E18; } .hometext a:hover { color: #7F7F7F; } .hometext ul { list-style-image: url(http://www.nectardesign.com/images/arrow.gif); margin-left:3px; margin-top:0px; padding:0 0 0 15px; clear:both; text-align: left; } .hometext li { padding:0 0 5px 0; clear:both; text-align: left; width: 230; ] Alrighty, my friend made this menu: phreakyourgeek.com/tf2/original which looks great in Firefox/Opera. However, Internet Explorer absolutely rapes it and it comes out all whacked up. He gave me the task of redesigning it for IE. I am not a CSS whiz, but I made it this far: phreakyourgeek.com/tf2 which needs some help. -Background does not move when hovered over. -The menu is aligned along the left side, they need to align along the right CSS for my menu is embedded in the source, CSS for original is in phreakyourgeek.com/tf2/original/stylesheet.css Please help me make any adjustments to either of them; there must be a way to make the first IE compatible. Thank you for your time. EDIT: I was informed upon posting that links were not allowed for new posts; I have removed the "www." preventing such restriction. I disagree with your rule; my links are legit and without them my visit would be useless. I'm pretty green with CSS (okay, ALL of html ) I used a template from Mollio.org, then modified it, problem is things just dont look right in IE. url: http://www.m87-blackhole.org/foo/ css file: http://www.m87-blackhole.org/foo/css/wushuwest.css js http://www.m87-blackhole.org/foo/js/common.js The biggest problem is the handling of png+transperancy, I added a fix for it in common.js but it doesnt seem to work very well. Also, the head image, in firefox it has a width of 800, which is what I want, but in IE it spans the entire page, how can I fix that? Any ideas, pointers or resources? Thanks, Mike EDIT: solved, can be closed Please look at the menu on this page, http://www.dougswansonre.com/ In IE7 it looks perfect, in FF it looks terrible??? I figured it out, I think. It would seem I am always "taking" from this sites and never giving much back, but not today. I had posted a message a few days ago which generated a reply with a link to this site - http://www.sitepoint.com. While I was there, I requested a sample download of some chapters of a book. It was in the book "Html without tables" or something like that they pointed me to this sample site - www.footbagfreaks.com What an awesome way to learn css layout. I checked it in both IE and NS and it was pefect. There are three .html files and one style sheet. I know I will be studying this code if only to get the basics down. I hope this works for you. Check out this site (WIP)... the issue specifically is with the Screenshots table... Firefox displays exactly like I would expect it to, screenshots contained within a div, with overflow: auto... looks great in firefox, nicely aligned, no vert. scrollbar... perfect. Now look at it in IE... looks like it is automatically expanding to include ALL 10 screenshots, which stretches the whole page... I've done a little research on this, but I can't find a way to get IE to behave... tried word-wrap: break word (as suggested on another site), but this fails as I'm using images. What makes IE decide to expand the <div> tag automatically. Here's the code pertaining just to the screenshots section. Any help or advice you might give me would be appreciated, I've spent a long time developing the site in css and have only opted to use tables for this particular page... thanks! the CSS: --------------------------------------------------------- .screenshots_table { width: 100%; border: 1px solid #000; backgroung-color: #061840; line-height: 15px; } #screenshots_table_overflow { overflow: auto; padding: 0px; display: block; } --------------------------------------------------------- the html: --------------------------------------------------------- /* --- START SCREENSHOTS CONTAINER --- */ // establish the number of screens in the directory $dir_path = "Game Archive/" . $platform_name . "/". $title . "/Screen Captures/"; $screen_count = count (glob ($dir_path . "screen*.jpg")); echo"<td colspan='5'>"; echo"<table border='0' cellpadding='0' cellspacing='0'>"; echo"<tr>"; /* start screenshots details tab */ echo"<td>"; echo"<table border='0' cellpadding='0' cellspacing='0'>"; echo"<tr>"; echo"<td><img border='0' width='38px' class='display_block'"; echo"src='images/tab_left.jpg'></td>"; echo"<td width='100%' background='images/tab_bg.jpg'></td>"; echo"<td><img border='0' class='display_block' width='70px'"; echo"src='images/tab_screenshots.jpg'></td>"; echo"</tr>"; echo"</table>"; echo"</td>"; /* end screenshots tab */ echo"</tr><tr>"; /* start screenshots */ echo"<td>"; echo"<div id='screenshots_table_overflow'>"; echo"<table width='100%' border='0' class='screenshots_table'"; echo" cellpadding='0' cellspacing='0'>"; echo"<tr>"; // iterate through loop and display linked screenshots as req'd for ($i = 1; $i < $screen_count + 1; $i++) { echo"<td cellspacing='1' valign='top' bgcolor='#04112d'>"; echo "<a href='Game Archive/" . $platform_name . "/" . $title . "/Screen Captures/screen" . $i . ".jpg' rel='lightbox' class='horizontal'><img border='0' class='border' src='Game Archive/" . $platform_name . "/" . $title . "/Screen Captures/small" . $i . ".jpg' /></a>"; echo"</td>"; } echo"</tr>"; echo"</table>"; echo"</div>"; echo"</td>"; /* end screenshots */ echo"</tr></table>"; echo"</td>"; /* --- END SCREENSHOTS CONTAINER --- */ --------------------------------------------------------- Essentially it lines up correctly but when I view it in firefox it doesn't. How should I tweak my code to make this work? Here is the url: http://www.westcadet.com/designs/index.htm Here is the CSS code snippet that is making this all work Code: /*--------------- Navigation Layout Begin ---------------*/ #HeaderTopLeftInnerRight { width:618px; height:100px; vertical-align:top; } #NavMenu { width:600px; padding-top:22px; } #NavMenu ul { list-style: none; margin-left:22px; } #NavMenu li { float: left; padding-left:8px; padding-right:8px; } #NavMenu li a { color:#FFFFFF; text-decoration: none; } #NavMenu li a:hover { color:#EB2A2D; } .NavChosen { background-color: #858181; color:#FFFFFF; } I'm beating my head against the wall on this one and could use some expert help. In full disclosure, I am using a css template site I found on a open source template site. The site renders fine in Firefox and Opera, but is problematic with some pages. Here is one of the pages I am having trouble with in IE: http://worldwidemediaproject.com/tvrating.php You'll notice that in IE it appears like there are a bunch of <br>'s after the TV Stations header. This does not appear in either Firefox or Opera. The strange thing is this one appears fine in IE: http://worldwidemediaproject.com/tvrating.php?id=71&language=all&genre=all but this one doesn't: http://worldwidemediaproject.com/tvrating.php?id=216&language=all&genre=all The only real difference is that the table size is larger in the pages that have display problems. Is there some kind of IE hack that I need to apply? Many thanks.... Yesterday I was able to get my page to validate with strict XHTML and get it looking exactly how I want it to in Firefox: http://www . restonheights . com/ However, the design falls apart a bit in IE6. Viewing in it IE6 causes the feedback div to grow causing a left-right scroll bar. Scary things also happen if you reduce the width of your browser. Again, it behaves perfectly in FF. Can anyone recommend an IE hack that would get that feedback div to behave? Hi folks. I'm new to this forum, but I'm not new to CSS. I've inherited a little problem that was left behind by my client's original developer. Here is the code the makes up the header on my page: Code: <body> <div id="issingle"> <div id="container"> <div id="sitename"> <a href="http://www.nectardesign.com"><img src="http://www.nectardesign.com/blog/wp-content/themes/default/nectar-product-development.gif" border="0" alt="Nectar Product Development"/></a> </div> <div id="mainmenu"> <ul> <!--<li class=""><a href="http://www.nectardesign.com/blog">Home</a></li>--> <li class="page_item"><a href="http://www.nectardesign.com/about/">about</a></li> <li class="page_item"><a href="http://www.nectardesign.com/service/">service</a></li> <li class="page_item"><a href="http://www.nectardesign.com/category/all-products">portfolio</a></li> <li class="page_item current_page_item"><a href="http://www.nectardesign.com/blog/">blog</a></li> <li class="page_item"><a href="http://www.nectardesign.com/blog/category/news/">news</a></li> <li class="page_item"><a href="http://www.nectardesign.com/career/">career</a></li> <li class="page_item no_bar"><a href="http://www.nectardesign.com/contact/">contact</a></li> </ul> </div> And here is the css pertaining to that code: Code: body { background:#fff; color:#303030; font: normal 12px /*Verdana,Tahoma,*/Arial, sans-serif; margin:0 auto; padding:0; text-align:center; width:850px; } #container { position: relative; background:url('http://www.nectardesign.com/images/headerbg.jpg') top center repeat-x; color:#303030; border:1px solid #C8C8C8; margin:10px; /* padding:10px;*/ text-align:left; height:598px; } html>body #container {height: 1%; min-height: 598px;} #mainmenu { position: absolute; right: 10px; top: 27px; margin-right: 5px; } #mainmenu li.page_item { float:left; /* height:35px;*/ list-style:none; margin:0; padding:0; } #mainmenu a { border-right:1px solid #b0b0b0; color:#808080; display:block; margin: 0; padding: 1px 8px; text-transform:lowercase; } Basically, this page's header looks correct in Firefox and Safari, but terrible in IE 5.x (Mac). Not only do the horizontal links (About, Service, Portfolio...) not show up correctly--they're actually on the left sidebar--but the repeating image doesn't repeat like it should. It doesn't even show up at all. Since I'm new, please don't hesitate to let me know if I'm forgetting to include any other important info. Thank you!! J Hi! I am making an online store for a very important client of mine. I build a shopping sub-list which floats to the left of the main page... and it looks BEAUTIFUL in Safari. But the images are not displaying correctly in Firefox. I was hoping somebody could help me. Also, could somebody tell me how it looks on IE? I have a mac, and my client is probably using IE... so I can't see how it looks Anyway, the site is.... blocked and the CSS #shoppinglist1 li { float:right; list-style: none; display:block; } #shoppinglist1 a{ width:100px; height:20px; text-decoration:none; background-image:url(images/shoppingmenu-bgsmall.gif); background-repeat: repeat; background-position: center center; } #shoppinglist1 a:hover { width:100px; height:20px; text-decoration:none; background-image: url(images/shoppingmenu-hover.gif); background-position: center center; } #shoppinglist1 a:active { width:100px; height:20px; text-decoration:none; background-image: url(images/shoppingmenu-active.gif); background-position: center center; } and the HTML <div id="shoppinglist"> <img src="images/shoppingmenu_top.gif" style="margin: -15px auto;"/> <ul id="shoppinglist1"> <li><a href="#"><img src="images/shoppingmenu_03.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_04.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_05.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_06.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_07.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_08.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_09.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_10.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_11.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_12.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_13.gif" align="center" border="0"/></a></li> <li><a href="#"><img src="images/shoppingmenu_14.gif" align="center" border="0"/></a></li> </ul> <img src="images/shoppingmenu_bottom.gif" /> </div> Thank you so much for your help! hi, I have 3 DIV's, The first div is like a menu header DIV and the second DIV is the menu links and the third DIV has some information I want to click on the first DIV then show the second DIV like a menu problem is the third DIV moves down.. How can i let the second DIV overflow over the third DIV without it moving down? Thanks |