CSS - Div Overlaps
Hello,
My code overlaps on FF unlike at IE , but I need the positioning at one div though. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Sample Title</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <style type="text/css"> div#con{background:#685127; margin:10px; width:350px; padding:20px; border: 2px solid #000; position:relative} div#con2{background:#cc0033; height:80px; padding:0; margin:0; border:2px solid #2ff; float:left} </style> </head> <body> <div id="con2"> <p>lorem fill column strong column fill fill column strong column fill</p> </div> <div id="con"> <p>fill fill column strong column fill</p> </div> </body> </html> Similar Tutorialshow can i stop my buttons overlapping the formfield, without using spacers? Using margin-top=5px; doesnt work Code: <style type="text/css"> <!-- * { margin: 0px; padding: 0px; border-style: none; text-align: center; } .ff { font: 11px Verdana, Geneva, sans-serif; margin: 2px 0px 0px; padding: 0px; border: 1px solid #0FF; color: #000000; } a.Butt:link, a.Butt:active, a.Butt:hover, a.Butt:visited { color: #FFF; background: #06F; padding: 2px; border: 1px outset #00C; } --> </style> </head> <body> <p><input name="pword" type="text" class="ff" id="pword" size="30" maxlength="40" /> </p> <p><a href="#" class="Butt">login</a> <a href="#" class="Butt">reset</a></p> <p>ready</p> <p> </p> </body> I was reading through some articles here about dropdowns and have found that the Son of Suckerfish menus were a good bet. When it rolls over it displays it correctly in IE by putting the dropdown under the link, but in Firefox it puts it smack over the top of it so you cannot read the original link. It worked in both browsers untill I added the main links to what they in the code below to include the pics. I had to put them in divs to align the text next to the icon correctly (verticle mid align next to img?? I jsut set a top margin to push it - is this best?). Heres a link to show you: http://skyyfinancial.com/demo/menutest2.php I put it all together and my list looks like this: Code: <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div> <ul id="nav"> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Hard Money Loan General </div></a> </li> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Real Estate Leasing General </div></a> <ul> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Lease to Own</div></a></li> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Apartment</div></a></li> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Commercial</div></a></li> </ul> </li> </ul> </div></td> </tr> <tr> <td><div> <ul id="nav2"> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Home Loans General</div></a> <ul> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Purchase</div></a></li> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Refinance</div></a></li> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Construction</div></a></li> <li><a href="#"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/PDF-icon.gif" width="35" height="35" /></div> <div id="link" style="float:left; margin-top:12px;">Second Mortgage</div></a></li> </ul> </li> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Broker Application</div></a> </li> <!-- etc. --> </ul> </div></td> </tr> <tr> <td><div> <ul id="nav3"> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Commercial Lending General </div></a> </li> <li><a href="#" class="headersm"><div id="pdflogo" style="float:left; margin-right:15px;"><img src="images/adobePDF.gif" width="40" height="40" border="0" /></div> <div id="link" style="float:left; margin-top:12px;">Financial Analysis</div></a> </li> <!-- etc. --> </ul> </div></td> </tr> </table> As of right now it works as it should and I only have the one serious issue with it overlapping. Any help on the rest of my questions would be great as well. Other questions I had: Because I had to split them up, I had create a new id for each in IE or it wouldnt work. Only the first one would work. I renamed them and duplicated the code over to the new names ( so theres 3x as much code). I think this could be a javascript issue, but I am not positive. I put my css and javascript at the bottom of this post. I can make a new thread in javascript forum if someone can tell me if that is the problem. ( I looked at it and it seems maybe it needs some type of loop? Not positive ) Lastly, in order to list the lists under eachother, i had split them up into a div per row inside of a table. Otherwise they would just continue across the page. Anyway better of doing this? css: Code: #menu, #menu ul { padding: 0; margin: 0; list-style: none; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#636363; font-weight:bold; } #menu a { display: block; width: 275px; } #menu li { float: left; width: 275px; } #menu li ul { background-color:#FFFFFF; position: absolute; width: 200px; left: -999em; } #menu li:hover ul { left: auto; } #menu li:hover ul, #menu li.sfhover ul { left: auto; } Javascript Code: sfHover = function() { var sfEls = document.getElementById("menu").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); Thanks for the help Hi Could someone take a look at this please http://dmumford.bizhat.com/rca/fixtures.htm When viewed in firefox you will see my data table overlaps the div coloured brown, anyone know why this is ? Thanks for your help. Hi, folks. I'm running into a pretty serious problem to which I'm really, really hoping someone will know a solution. We use a menu system on our site which is made up of layers. It provides for flyout-hierarchical menus, and up until now has caused me no grief. However, now that I've embedded a flash movie onto a particular page the layers that comprise the flyout menu items are hidden beneath the Flash movie. I've tried putting the object tag inside a div and setting the z-index of the div to 1 (and also to -1) but that didn't work. Can anyone take a look and let me know if they have any ideas? http://www.unbc.ca/test.html Cheers and TIA, Pablo |