CSS - Need Help With Collapsing Div In Ie
Similar Tutorialsthe contentWrapper div section collapse prematurely in mozilla, but displays fine in IE. Anyone know why? http://www.mgan.net/work/10-06-04/layout1.html Is there a css rule I don't understand in firefox that IE is overlooking? So... I have two versions of this page, one that validates, and another that doesn't. Problem is that the invalid one looks correct! This is because I got the css working before i discovered the invalid code... The offending code involves a nested ul in my nav. The invalid, looking good version looks like this: Code: <ul> li / li / <ul> li / li / </ul> li / </ul> To make it valid, I have to wrap li tags around the nested ul. I've spent gobs of time trying to figure out how to get my styles to work with this new code, but I must be missing something very simple. Here are the urls: invalid & valid Here's the css: Code: #nav { width:180px; background-image:url(/images/moraga_logo.png); background-repeat:no-repeat; float:left } #nav ul.l1 { width:179px; position:relative; top:100px; margin:0; padding:0; } #nav ul.l2 { width:179px; margin:0; padding:0; } #nav ul.l1 li { list-style:none; border-top:1px solid #FFFFFF; height:21px; font-family:geometric, lucida, verdana, sans-serif; font-size:.8125em; font-weight:normal; text-transform:uppercase; letter-spacing:.125em; text-align:right } #nav ul.l2 li { text-transform:lowercase; border:none; font-size:.6875em; } #nav li.active a { color:#A22B38; text-decoration:none } #nav li.active a:hover { color:#FFFFFF; text-decoration:none } #nav a:link { color:#000000; text-decoration:none } #nav a:visited { color:#000000; text-decoration:none } #nav a:hover { color:#FFFFFF } #nav a:active { color:#000000; text-decoration:none } Thank, in advance, for your generous help! -BBD I thought I had this worked out before with the help of this forum, but it seems to be back again! In IE 6 (and maybe others, who knows. I am running Ubuntu =/ ) there is a big gap between the top horizontal nav and the comic. http://www.jjsunshines.com/ Any help would be greatly appreciated! I'll even trade you php help! This is the first site I have attempted to layout using CSS and have ran into a slight problem that I can't figure out so I am looking to the expertise of others. I have a layout that contains a sidebar (used for sub-nav) and a content area all inside of a wrapper. When there is content in the sidebar all is fine in IE and Firefox; however when I include no content in the sidebar IE looks fine but Firefox collapses the space where the sidebar was and begins the content there. Here are some of the links; Appearing correctly due to content in sidebar: http://www.jaycutler.com/Eumyotheria/the_program/the_program_index.html Appearing incorrectly due to no content in sidebar: http://www.jaycutler.com/Eumyotheria/contact/contact.html The CSS file can be found he http://www.jaycutler.com/Eumyotheria/css/stylesheet.css Any advice that can be offered would be greatly appreciated. Thank you for your time, Brian Hi I have site where I am forced to set my content div <div id="content"> min-height with jquery on each page.Site Link This is because the content div keeps collapsing and ignoring the content it has. Can someone teach me how to fix this please. Hi. Please see the code below. I basically have a two column layout placed inside a container div(id="productDiv"). Each column is floated left, followed by an empty div that is set to clear:both. However, the productDiv collapses over the floated divs in Mozilla. It works as expected in IE. If I place a border on productDiv, it will expand as desired. This seems like buggy behavior for Mozilla. Has anyone ever seen this? Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Testpage</title> <style type="text/css"> body{ background-color: #eeeeee; color: #000000; margin: 20px auto auto auto; } #content{ position: relative; background-color: #ECEADD; font-size: 8pt; padding: 0; } #productDiv{ position:relative; margin-left: 12em; background-color: #00ff00; /*border: 1px solid black;*/ padding:0; } #category{ position:relative; color:#000000; font-size: 18pt; margin: .5em 0 .5em 0; } #productInfoLeftCol{ position: relative; float: left; } #productImage{ position: relative; height: 360px; width: 310px; display:block; } #productInfoRightCol{ position:relative; float: left; margin-left: 1em; } .clearer{ clear:both; } </style> </head> <body> <div id="content"> <div id="productDiv"> <h2 id="category">Category</h2> <div id="productInfoLeftCol"> <img id="productImage" src="http://www.google.com/intl/en/images/logo.gif" alt="Some Product Image"/> some text here </div> <div id="productInfoRightCol"> rightcol </div> <div class="clearer"></div> </div> </div> </body> </html> Hi all, I am trying to collapse columns on double click by changing the style visibility of a col class from visible to collapse. Nice idea idea but it is not supported on IE and , although Firefox claims it does, with Firefox doesn't work either. sooo, do you know of any alternative to using the collapse thingie? 'hidden' is not an option as it leaves the space of the column on the table layout. I am checking the display prop now but I am not understanding it very well if it's a solution for me. many thanks in advance. I am just being scripting and have been messing with this problem for several hours and still have gotten no where at all so I was hoping for some assistance. I am attempting to make my stacked links open upon mouseover to display all the sublinks beneath the main ones and then close one the mouse is moved away from that area. I have the main ones working, as that is easy, it is those others that have me stumped. I am using outset and inset boarders to make it appear as if a drawer is being pulled out to reveal the sub-links. Any advice would be great, thank you. Or really in this case their not collapsing like the should be. I have extra white space above each heading link in the gallery: http://www.sonicparke.com/skydev/gallery/ I'm also guessing that the same issue is causing the whitespace above the single column pages across the site like these: http://www.sonicparke.com/skydev/about.php http://www.sonicparke.com/skydev/about.php But it's weird that it's not happening on these: http://www.sonicparke.com/skydev/news.php I know that the zen.css file is a mess but I plan on cleaning it up a little later once I've worked through figuring out what I need and don't need. Maybe that's part of my problem but I'm still having the issue on the single column pages which don't even use the zen.css stylesheet. Thanks for the help. Hi, I want to make something that works like this: dhtmlgoodies.com/scripts/slidedown-menu2/slidedown-menu2.html# (cant post proper urls as I'm new) Whereby each link has a number of sub-links under it, and when you click a main link, the sub links for the previous one shut and the new one opens. But the tutorial on that site is not much help. It just gives you a load of code to copy into your editor, and when I've done that it didn't work anyway. Could someone point me in the direction of a tutorial to do this or let me know what I should be doing, as I can't seem to find anything on how to do it. Thanks! Hi, I have a border around the content of my page which is limited in width but not height. Some of the pages have more content then others so the height adjusts. I also have a left column and a black background with and image in this column but I have 2 problems 1. In IE I can't seem to get this black column(div) to extend to the full height of the column so that it reaches the border. 2. In Firefox this left column extends all the way down the page and the border doesn't surround the text it sort of collapses The column is left floated and in a div and the content is right floated and in a div as well which is all surrounded by a div with a border. I would appreciate any help that you might offer. Thanks Everyone knows about collapsing margins, but not everyone knows that inline blocks never collapse. So it would appear that IE treats tables as block elements (so margins collapse) and firefox treats them as god-knows-what (but akin to inline elements - so they do not collapse). Now, whether its right or wrong, I want the firefox behaviour - so I tried to display the tables as inline. This fixes IE.... but breaks firefox - the tables "loose" their width parameter so they don't display with correct widths. Does any CSS guru know a nice solution to this dilema (I know a couple of dirty solutions). To elaborate further on what is going in: There are a number of tables one after the other in the normal flow of the document that need to be seperated by certain margins. I've been looking through many, many forums trying to resolve this issue, so please forgive me if there is a solution to this that I've missed. Here's the deal: On some installs of Firefox (4.0), the body is being positioned 28px lower than the top of the screen. I set the <html> tag to have a light blue background to troubleshoot the issue, and now there is a light blue bar across the top of the page, proving that it is the body of the page that is lower than it should be. I thought it was a Firefox "collapsing margin" issue, so I added "margin:0; to almost everything, and it didn't help. I'm trying to do this without having to absolutely position everything. Here's the site: www-dot-myportlandtours-dot-com here's the css: www-dot-myportlandtours-dot-com/wp-content/themes/myportlandtours/style.css Anybody have insight into this? Hi! Is is vicious to display a table as "display: block" to force margin-collapsing? Otherwise there's no margin collapsing with other elements. Thanks |