CSS - Inner Div Weirdness Mozilla/ie
Description of example:
A div with an h5 as box title, and another div containing some text. The h5 text is one long string to force the outer div to expand. http://files.contradix.com/css1.html On IE: - the 'innerbox' DIV (pink) doesn't expand to the width of the box DIV (orange border) so I get a white space on the right hand side.. Even setting width: 100% doesn't work On Mozila: - Extra long text spills outside of its containing div. Yuck. Any pointers on how to make this work equally well on Mozilla and IE such that the inner div is 100% and the text from the h5 doesn't spill out and willl expand the outer div if ncessary? thanks -j. Similar TutorialsHi. I'm having some trouble with margins & padding in IE. In FF it looks great but IE not so much. There's not a lot of code there yet because I'm still in the early stages of working out the design but I'd like to know what it's missing or what I'm doing wrong now rather than having to fix it all later. Here's the site. Thanks in advance. I know I'm a newbie here but I'm sure I'll be spending way more time here in the future. Thanks! Brad hey everyone, need your help here. i have a run-of-the-mill FAQs page with questions at the top anchored (# links) to various text answer sections at the bottom. i have the following for links in my external css page: a:link { color: #4480D5; font-size: 12px; line-height: 1.6em; text-decoration: none; } a:visited { color: #FF9B21; text-decoration: none; } a:hover { color: #FFC51B; text-decoration: underline; } a:active { color: #4480d5; } it seems once i click a #link once, IE, in it's infinite stupidity, sees that this page has been visited, hence ALL my #links show up as visited. anyway I can get around this? if this is covered elsewhere, please point me to it thanks! I am trying to achieve a three column directory listing. The page is here Code: http://www.growneb.com/listing/members_t.php?mode=search&cat[0]=&cat[1]=&method= Why is it that the third column doesn't seem to float? How can I get the lists to align along the top? Be gentle, I'm just the backend programmer trying to add this to someone else's page. I don't understand why some elements in IE6 & 7 are working with :hover and images are not. Of course in FF it's all great. The text links in IE are working fine but the images are not. Actually before i added the border color specifically to the images it was the crappy default blue & purple even thought the links are style right and look right in FF. Why is this happening? http://aricandaidan.com/aric Thanks! Brad HELP! this is the deal. My CSS/html looks great in IE.....BUT, when i open it in Mozilla, its like Mozilla isn't even registering the external css...only the html. Any ideas on how to make it work in both ie and mozilla?!? I am trying to display a banner (image) at the top of my page with a menu under it. In IE the image aligns to the top of the menu, but in Mozilla the menu starts 15 pixels below the image. I've tried setting margin and padding to 0 for all div tags but that does not help. If I set margin=-15px for my #hnav it aligns in Mozilla, but then the menu is pushed up 15 pixels in IE. I've tried an old IE hack from eric myers, but both IE and Mozilla read the hack code and it did not help. Code: <html> <head> <style type="text/css"> body {margin:0; padding:0;} html {margin:0; padding:0; background-color:#646874; font-size:11pt; font-family:Verdana, Arial, Helvetica, sans-serif;} img {display: block;border:none; margin:0;padding:0;} a:link, a:visited { color: #00F; text-decoration: none; } #pageContent {margin-left:24px;margin-top:12px;padding-bottom:45px; padding-right:7px; } .contentImg {width:707px;padding-left: 209px;} .padRight { padding-right: 15px; } #banner { width:820px;height:149px; background-image:url(images/820x150.gif); background-repeat:no-repeat; } #hnav {width:820px;height:42px;background-image:url(images/navbar.gif);background-repeat:repeat-x; margin-top: 0px;} #hnav ul {list-style:none;padding-left:20px;} #hnav ul li {float:left;font-size:11px;padding-right:15px;background-image:url(images/divider.gif); background-position:right;background-repeat:no-repeat;height:30px;} #hnav ul li a {padding-right:15px;position:relative;top:9px;text-decoration:none;color:#000;} #hnav ul li a:hover {color:#777777;} #hnav .curNavItem {padding-right:15px;position:relative;top:9px;text-decoration:none;color:#000; font-weight:bold;} </style> </head> <body> <div id="centerPage"> <div id="mastHead"> <div id="banner"></div> <div id="hnav"> <ul> <li><span class="curNavItem">Home</span></li> <li><a href="gold.html">Gold</a></li> <li><a href="silver.html">Silver</a></li> <li><a href="ssteel.html">Stainless Steel</a></li> <li><a href="glass.html">Glass</a></li> <li><a href="gemstones.html">Gemstones</a></li> <li><a href="custom.html">Custom</a></li> <li><a href="plating.html">Plating</a></li> <li><a href="events.html">Events</a></li> <li><a href="contactus.html">Contact Us</a></li> </ul> </div> </div> </div> </body> </html> Hello. I can't figure out why Mozilla Firefox won't interpret my CSS correctly. In IE my site works just fine but in Firefox it doesn't work at all. The only part of the css file mozilla is picking up is the body font. Any ideas? is there away for me to make css work in mozila? I have this for IE but when i view the site in mozilla/netscape then the tables and etc are all out of place Code: .10w { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; font-weight: normal; } .10wB { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #FFFFFF; } .10b { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; } does anyone knows how to make it work? Im new to CSS and have a problem. IE displays my webpages without problem but when testing in Mozilla only a small number of CSS borders are visible. Here's an example. This works OK .right { border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666; } But this one does not display? .3pxspacernobackborder3 { padding: 8px; font-family: Verdana, Arial, Helvetica, sans-serif, "Book Antiqua"; font-size: 12px; color: #000066; border-top: 1px solid #666666; border-right: 1px solid #666666; border-bottom: 1px none #666666; border-left: 1px none #666666; } This is probably somethign simple but be gentle please guys. Code: <style> a.ClassA{ background-color:#000000; color:#ffffff; width:200px; height:50px; } a.ClassA:hover{ background-color:Red; } </style> Code: <a href=# class=ClassA>Sample</a> IE http://img156.echo.cx/img156/604/ie9ay.png Mozilla http://img156.echo.cx/img156/7571/moz6ed.png The result I want is the same with IE why is it different in Mozilla ? Hi, I am facing a terrible problem where in the following css code(setting of height) is working for Mozilla 3.0 but is not working for IE 6 in Css .fsSearchIE{ height:5px !important; background: red!important; border: 1em solid green; margin: 0 auto !important; } In html <fieldset class="fsSearchIE" > my code </fieldset> Would be thankful Sandeep My work wasn't allowing us to have Mozilla on our computers so when I began my website I had to code for IE. Well now that we have clearance for FireFox, I've tested it and it appears that my CSS isn't even there when opening the page in Mozilla. It just looks like straight HTML. I know that due to my work being crazy I'm doing this a bit backwards (should always code for Mozilla and debug in IE), but this is what I have to work with and I need your help. Here is the CSS reference: Code: <link href="D:\Play\PersonalWebsite\WebContent\CSS\Style.css" rel="stylesheet" type="text/css" media="screen" /> Here is the CSS: Code: body { background-color:#666633; background-image:url(http://i444.photobucket.com/albums/qq161/JadieGlitch/bg.jpg); background-repeat: repeat-y; margin: 0; padding: 0; font-family: "Trebuchet MS",Tahoma,Lucida Sans,Arial,Verdana,Helvetica,sans-serif; } @media screen { div#lockedLeftContainer, div#lockedTopContainer { position: fixed; } div#lockedTopContainer{ background-color: #191916; height: 204px; width: 1500px; background: url() no-repeat; left: 0; } a img { border:none; } div#linkList h3 { display: none; } div#lockedLeftContainer, div#lockedLeftContainer a { left: 0; top: 270px; width: 185px; height: 100%; font-size: 12px; padding: 5px; padding-right: 10px; font-weight: bold; color: #FFF; } div#lockedLeftContainer a:hover { color: #191916; } div#News { margin-left: 445px; padding: 10px; padding-left: 20px; padding-bottom: 0; height: 100%; } div#supportingText{ height: 100%; } .clr { clear:both; } div#News h3, div#supportingText h3 { display: block; background: url(http://i444.photobucket.com/albums/qq161/JadieGlitch/hatching.gif) left top repeat #191916; margin: 0; padding: 0; padding-left: 20px; color: #FFF; font-size: 24px; line-height: 50px; text-transform: lowercase; width: 100%; } div#News h4, div#supportingText h4 { display: block; background: url(http://i444.photobucket.com/albums/qq161/JadieGlitch/hatching.gif) left top repeat #191916; margin: 0; padding: 0; padding-left: 20px; color: #FFF; font-size: 24px; line-height: 50px; width: 100%; } div#News p, div#supportingText p { font-size: 14px; color: #191916; line-height: 1.5em; padding-left: 10px; } div#clear { clear:both; } div#News a, div#supportingText a { color: #191916; } div#News a:hover, div#supportingText a:hover { color: #FFF; } div#News abbr, div#News acronym, div#supportingText abbr, div#supportingText acronym { border-bottom: 1px dotted #191916; } div#footer { display: block; height: 20px; background: url(http://i444.photobucket.com/albums/qq161/JadieGlitch/hatching.gif) left top repeat #191916; padding: 3px; font-size: 12px; line-height: 20px; text-align: center; margin-bottom: 10px; } div#footer a { color: #fff; font-weight: bold; } div#footer a:hover { color: #000; } div#linkList { position: fixed; left: 210px; top: 310px; width: 240px; font-family: Baskerville,Georgia,Garamond,"Times New Roman",serif; } div#linkList ul { list-style: none; padding: 0; margin: 0; height: 100%; } div#linkList ul { list-style: none; } div#linkList ul li { border-bottom: 1px solid #630; } div#linkList ul li a { display: block; padding: 5px; font-weight: bold; font-size: 12px; color: #663; text-transform: uppercase; text-decoration: none; height: 100%; } div#linkList ul li a:hover { border: 1px solid #000 } div#linkList div#lselect ul li, div#lStore ul li { padding: 5px; padding-left: 20px; padding-right: 20px; height: 100%; } div#linkList div#lselect ul li a:hover, div#lStore ul li a:hover { color: #000; } div#linkList div#lselect ul li a.c, div#lStore ul li a.c { display: inline; text-transform: none; font-size: 10px; color: #191916; } div#lStore ul li a.c:hover { text-decoration: underline; } div#linkList div#lselect, div#linkList div#lStore, div#linkList div#lresources { margin-top: 10px; } div#linkList div#lselect h3, div#linkList div#lStore h3, div#linkList div#lresources h3 { display: block; height: 35px; margin: 0; padding: 0; } div#rotate_ad { display: block; height: 150px; margin: 0; padding: 0; } div#linkList div#lselect h3 span, div#linkList div#lStore h3 span, div#linkList div#lresources h3 span { display: none; } div#linkList div#lselect h3 { background: url(http://i444.photobucket.com/albums/qq161/JadieGlitch/PhotoGallery.gif) center top no-repeat; } div#linkList div#lresources h3 { background: url(http://i444.photobucket.com/albums/qq161/JadieGlitch/Resources.gif) center top no-repeat; } div#contactInfo { position: absolute; left: 210px; top: 400px; } div#newsimage { position: relative; left: 25px; top: 25px; } My site is http://www.shiningstarsyouth.com/. If you render the page in IE and Mozilla it seems that Mozilla renders my nav bar a couple of pixels lower than IE. Also the hover link style sheet that I used on the links in the upper right of the page work in Mozilla, but not in EI. The long vertical grey line that goes down the center of the page also renders differently in length. Why do these differences exist http://www.em1.nl/martijn/test.html It works perfect in IE, but in mozilla it doesn't, anyone has a solution? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <style type="text/css"> #script { display: block; width : 200px; cursor : pointer; } A:HOVER { color : Yellow; } A { color : White; font-weight : bold; font-size : 12px; font-family : Arial, Helvetica, sans-serif; text-decoration : none; } body { font-family: arial, helvetica, serif; } </style> <script> function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = ""; } else { obj.style.display = "none"; } } } </script> </head> <body bgcolor="#000000" link="#FFFFFF" vlink="#00FF00" alink="#FFFF00"> <div style="display: block;" onMouseOver="showhide('script');" onMouseOut="showhide('script');"> <a href="#">Move mouse over this<br></a><font id="script" style="display: none;"> <a href="">link 1 Works perfect in IE</a><br> <a href="">link 2 BUT mozilla it doesn't :-)</a><br> <a href="">link 3 anyone knows a solution?</a><br> <a href="">link 4 ...............Thx</a><br></font></div> </body> </html> Please see the screenshots below. Im using offsetTop + offsetHeight of the headings (Menu1, etc) to assign style.top to the sub menus. They appear when you mouseOver the headings. See how there is a pixel or two of whitespace in IE6 w/sp1? Why is that? Any help would be greatly appreciated. PS - I tried this on another PC with IE6 and sp2, and it was fine. These are the style declarations: Code: .menuHeading{ padding-left:3px; font-size: 8pt; font-weight: bold; background-color: #ffffff; color: #000000; cursor: default; position: relative; margin-bottom: 0px; border-width: 0px; border-style: none; } .menuHeading_highlight{ padding-left:3px; font-size:8pt; font-weight:bold; background-color:#fff392; color:#000000; cursor:default; position: relative; margin-bottom: 0px; border-width: 0px; border-style: none; } .subMenu{ font-size:8pt; color:#cc9900; width: 200px; visibility:hidden; cursor:default; position: absolute; padding:0px; margin-top:0px; margin-left:0px } Hello. I am looking for the equivalent of createStyleSheet for the mozilla. I try to do the following and in ie it works but mozilla cannot understand it. Thanks a lot var css = document.createStyleSheet('new'); Hello -- The CSS file is being ignored by Mozilla Foxfire (IE recognizes it). When viewed locally in Foxfire, it's OK, but not when uploaded. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Karen Homepage</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="karen.css" rel="stylesheet" type="text/css" /> </head> Any clues/help would be greatly appreciated. Thanks -- JillC I'm designing a site and have an absolute div with a z-index of -1. This div has a background image. On top of this div I have a normal layout table with my content, in effect I wanted a background image that didn't tile, so I threw it in a div. When i view it in IE6 everything looks nice, but when I view it in firefox, the image doesn't show up, the dive borders dont show up and any text I put in the div doesn't show up. Any thoughts or workarounds why the image isn't showing. Thanks chuck_samsonite _______________________________________________ Lloyd: Oh yeah! It's right here, Samsonite! I was way off! I knew it started with an S though! I am trying a technique at this site, http://www.anncompton.com/test. The format works in IE but not Mozilla. It seems to be the div's with a repeat-y that are failing. Below is a subset of the code - somewhere in this is the problem. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link rel="stylesheet" type="text/css" media="screen" href="test.css" /> </head> <body> <div id="page"> <div id="pagea"> <div id="pageb"> <div id="pagec"> <div id="header"><img src="images/Banner2.gif" alt="Ann Compton" name="logo" id="logo" /></div> <div id="sidebar"> <h5>Cell: 910-699-6919<br /> Res: 910-699-4441 </h5> <a href="mailto:ann@mindspring.com">ann@mindspring.com</a> </div> </div> </div> </div> </div> </body> </html> <!--body { background:#e5f6f4 url(images/huntbkg.gif); margin:10px 0; padding:0px 5px 15px 10px; font:small/1.6em Verdana, Arial, Helvetica, sans-serif; text-align:center; color:#333; } #page { background:#B8BFD8 url(images/pg_topright.gif) no-repeat right top; margin:0 auto; padding-top:0px; width:995px; text-align:left; } #pagea { background:url(images/pg_right.gif) repeat-y right top; width:995px; } #pageb { background:url(images/pg_bot.gif) no-repeat right bottom; padding:0 0px 20px 0px; width:995px; } #pagec { background: url(images/grnbar.gif) repeat-y top left; width:990px; } --> |