CSS - Compatibility Problem With A Div
Ok.. I have a problem with a div on my index page.. Look at www.zepcom.dk .... in firefox, there are no errors... however in IE, there's an error with the newsletter div... It's some kind of CSS error.. but I can't seem to find a solution.... Can someone help me?
Similar TutorialsJust testing my new design on IE6 and it doesnt quite work. The table at the top of each category where it says "RW::Scripts" and "New Category" should fill the top of the frame 100% but it doesnt. You can see it in action here http://www.rwscripts.com/testsite/index.php It works fine in Firefox just not IE Heres the stylesheet that I am using Code: body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .tableborder{ border: 1px solid #000000; background-color: #FFF; padding: 0px; margin: 10px 20px 0px; } .debugborder{ border: 1px dashed #000000; background-color: #eeeeee; padding: 5px; margin: 10px 20px 10px; } .tablefooter { background: #A0BED3; padding: 2px; height: 29px; border: 1px solid #000000; } .tabletitle { height: 29px; border: 1px solid #000000; } .tableheader { font-weight: bold; color: #5285A2; height: 23px; border: 1px solid #000000; background: #A0BED3; } .mainrow { background: #EAEAEA; } .subfooter { font-weight: bold; background: #92ACBE; height: 29px; } .statHead { font-size: 12px; font-weight: bold; background: #004080 center; height: 20px; text-align: left; vertical-align: middle; padding: 4px; border-top: 0px solid #999999; border-right: 0px solid #999999; border-bottom: 1px dashed #999999; border-left: 0px solid #999 } .statRow { font: 10px Verdana, Arial, Helvetica, sans-serif; background: #006699; border-bottom: 1px dashed #999999; padding: 2px; } .ucpmain { font: 10px Verdana, Arial, Helvetica, sans-serif; border: 1px solid #cccccc; padding: 0px; } .ucpon { font: 12px Verdana, Arial, Helvetica, sans-serif; text-align: center; background: #006699; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding: 2px; height: 25px; } .ucpoff { font: 12px Verdana, Arial, Helvetica, sans-serif; text-align: center; background: #004080; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding: 2px; height: 25px; } .copyright{ font-family: Verdana, Tahoma, Arial, Sans-Serif; font-size: 11px; line-height: 12px; text-align: center; } .purple { color:purple;font-weight:bold } .red { color:red;font-weight:bold } .green { color:green;font-weight:bold } .blue { color:blue;font-weight:bold } .orange { color:#F90;font-weight:bold } Alright. I've got a simple layout - so far just a header in an HTML document with a linked to CSS document. The two interact with one another fine, that's not my problem. My problem lies between Internet Explorer and.. every other browser. As usual. Anyways, here's my header in Internet explorer: and in FireFox: The IE document is more or less what I need the FF to look like. I made some changes to the initially correct documents in FF to work with IE and screwed FF up, and I really have no idea how to sustain both. Now the HTML document: html Code: Original - html Code <head> <style type="text/css"> @import url(style/style.css); </style> </head> <body> <div align="center"> <div id="header"> <form> <input type="text" value="user" id="user"> <input type="password" value="pass" id="user"> <input type="submit" value="Submit" id="submit"> </form> </div> <div id="nav"> <ul> <li class = "active"><a href="index.php">home</a></li> <li><a href="/services">services</a></li> <li><a href="/pricing">pricing</a></li> <li><a href="/jobs">jobs</a></li> <li><a href="/contact">contact us</a></li> </ul> </div> </div> </body> <head> <style type="text/css"> @import url(style/style.css); </style> </head> <body> <div align="center"> <div id="header"> <form> <input type="text" value="user" id="user"> <input type="password" value="pass" id="user"> <input type="submit" value="Submit" id="submit"> </form> </div> <div id="nav"> <ul> <li class = "active"><a href="index.php">home</a></li> <li><a href="/services">services</a></li> <li><a href="/pricing">pricing</a></li> <li><a href="/jobs">jobs</a></li> <li><a href="/contact">contact us</a></li> </ul> </div> </div> </body> annnd the CSS: css Code: Original - css Code /* CSS Document */ body{ font-family:Verdana, sans-serif; text-align:center; margin:0px; } #header{ width:770px; height:69px; background: url(head.png) no-repeat top center; text-align:right; vertical-align:top; padding: 14px 40px 0 0; border-left:url(borderleft.gif); } img { vertical-align: bottom; display: block; } input{ height:18px; padding: 0px; width:70px; } #submit{ font-size:10px; font-weight:bold; } #nav { width:770px; background-color:#d2e3a6; height:24px; padding:0px; font-size:11px; } #nav ul { float: left; width: 770px; background-color:#dse3a6; margin: 0; padding: 0 0 0px 20px; list-style: none; } #nav ul li { float: left; margin: 0; padding: 0; } #nav ul li a { display: block; float: left; margin: 0 0 0 0; padding: 6px 10px 9px 10px; font-weight: bold; text-decoration: none; color: #555; } #nav ul li a:hover { background: #d9d9d9; } #nav ul li.active a, #nav ul li.active a:hover { margin-top: 0; padding-bottom: 10px; background: url(hover.gif) repeat-x bottom right; }
I'd be very appreciative if anybody could point out what's causing this problem. If you need any further information I'd be glad to provide it - note that the header image is blanked out on purpose. Thanks! check this out... ...http://www.topfloridavacations.com/tempLayout_copy(1).html... just that page, not any of the links it points to because they are using the same style sheet. Now... that page, looks okay under IE, however if you look at under Mozilla, the main menu with the tabs 'Florida Vacations', 'View All Listings' etc. do not have the border when you do a hover on them, AND the 'Members Area' being the selected choice does not have the bottom border. In IE, however, thats not the case, it just doesn't display it that way, and the only way to make it appear so that I've figured out involves skewing margins, which screws it up even worse for Mozilla. Any ideas? The style is located in that webpage; it's not in a seperate .css file. Thanks for any help if possible. Hello there, My CSS File is being a little problematic with a web page I'm making. Basically I'm using the CSS File to create the Div tags and both Internet Explorer and Firefox seem to be fine in positioning the div tags but for some reason firefox wants to ignore all border commands, so none of my div tags have borders in firefox where as Internet Explorer and other browsers seem to be fine with the code. div.three{ width:700px; height:200px; top:600px; left:50%; margin-left:-350px; position:absolute; border:#00CCCC outset thin; padding-left:5px; } That's all the CSS. If anyone has a solution as to why firefox doesn't like borders anymore that would be great. All i've found so far is that inset/ outset problem, nothing on dissapearing borders. Hi there, I just read some articles here on devshed and fell in love with the div/css technique Now I got the following problem (see the attached Screenshots) div1 is Firefox 1.0 div2 is IE 6.x The css code looks like that: PHP Code: body { margin: 10px; padding: 0px; } #leftcol { background: #FFFF33; margin-left: 80px; float: left; width: 30%; height: 250px; padding: 15px; } #rightcol { background: #33CC33; margin-right: 80px; float: right; width: 30%; height: 250px; padding: 15px; } The HTML Part: PHP Code: <div id="leftcol"> <b>Neuer Kunde</b><br> Falls Sie noch nicht in unserem System registriert sind klicken Sie bitte auf Neuer Kunde<br> <form action="country.php" Method="POST"> <input type="Submit" value="Neuer Kunde"> <input type="hidden" value="'.$baq.'" name="back"> <input type="hidden" value="'.$get_string.'" name="get_string"> <input type="hidden" value="'.$text.'" name="posttxt"></form></div> <div id="rightcol"> <b>Bestehender Kunde</b><br> Bitte loggen Sie sich hier mit Ihrer E-Mail Adresse und Ihrem Passwort ein<br> <form action="kdinfo.php" Method="POST"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="15%">E-Mail:</td> <td><input type="text" name="Rmail"></td> </tr> <tr> <td width="15%">Passwort:</td> <td><input type="password" name="Rpass"></td> </tr> </table> <a href=recover.php>Passwort vergessen?</a><br><br> <input type="Submit" value="Einloggen"></form> </div> Now how can I manage it to look simliar on IE and Firefox? I'd appreciate any help! Thanks for your time. A friend told me that css websites are sometimes displayed wrong with some browsers; the tables are out of place etc. Is this true? are there any issues with certain sites? Is css the best way to design an html site now a days? Sorry im a newbie in this, Im going to start learning soon. Thanks !!! Okay I have this website www.deminyx.com and It looks decent in Google Chrome but stupid in IE my #content div is in a different place, can anyone help me clean up my code. I validated the HTML and CSS with the w3c validator too! UGHH lol! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Deminyx| Web Solutions</title><link rel="stylesheet" href="index.css" type="text/css"> </head><body> <div id="header"><a href="index.html"> Deminyx</a></div> <div id="side"> <table> <tbody> <tr> <td><a href="service.html">The Service</a></td> </tr> <tr> <td><a href="cost.html">The Cost</a></td> </tr> <tr> <td><a href="ease.html">The Ease</a></td> </tr> </tbody> </table> </div> <div id="content">This is my content, I wont waste your time.</div> </body></html> and the CSS Code: body { background-color:#666; } #header { background-color:#399; text-align:center; font-family:Arial,Helvetica,sans-serif; font-size:7em; border-style:solid; border-width:2px; } a:hover { font-family:Arial,Helvetica,sans-serif; background-color:#399; } a { text-decoration:none; color:#000; font-size:1em; line-height:1em; } table { border:solid #000; background-color:#00991c; font-family:Arial,Helvetica,sans-serif; line-height:2.2em; width:20%; font-size:1.5em; margin-top:12px; padding:2px 2px 2px 19px; } #content { position:relative; float:right; background-color:#00991c; font-family:Arial,Helvetica,sans-serif; width:78%; font-size:1.2em; margin-top:-160px; border-style:solid; padding:4px 4px 4px 8px; } I just finished a layout using CSS and I'm aware that browsers 4.0 and earlier (or is it 3.0 and earlier?) won't be able to display it right. However, I also know that the browsers that do support CSS don't all display it the exact same way. I tested my layout using Internet Explorer 6 and Mozilla 1.6. I had to make a few changes to get Mozilla to display it close to what I intended. My question: which other browsers and versions should I test it on? I have always encountered problems trying to get my sites to work in IE6, mainly because it renders the margins as 2x the "right value". However I am curious: How does deliciousdays.com work perfectly in IE6 without using if IE6 conditional tag? I am making a site and this would be very useful. I try not to use the if IE6 conditional tag hack if possible. I have been working a rounded content box approach. The layout rendered beautifully in Firefox, yet IE threw a wrench into my layout. The approach has to be re-thought and aligned for compatibility with IE. The HTML and CSS code validates on the server. The situation may relate to the Box Model Hack, but I have little familiarity with the various workarounds and hack techniques. My questions relate to improving my current approach and incorporating any hacks if necessary. The layout no longer renders properly in Firefox since adding the width property to the following classes. div.ArticleHeader div.ArticleHeader div div.ArticleFooter div.ArticleFooter div My round content approach began from the following article: http://www.redmelon.net/tstme/4corners/ My idea involved an approach, which could incorporate numerous content box graphics; just like using tables. The content box could be square with one corner angle or rounded corner; outlined, embossed, etc. The redmelon approach uses a div wrapper containing the divs for the top, content, and bottom. My approach removed this div wrapper, which may be the first indicator. Let me simplify my questions. Would you recommend adding a wrapper around the content box beside the ID (navigation) wrapper? What Box Model hack would you recommend for my layout? How does the width property affect my content boxes? If I comment out the width, the layout renders in Firefox; IE still fails to render it. The #navigation container has a fix width; yet the #maincontent container has a min-width and max-width. Tricky! Why does the graphic, in div.ArticleFooter, extend the full width of #Navigation container? The class has a margin of 20px. The parent container also has a margin of 20 px? IE renders the whole layout as a mess. Once these content boxes address the box model, then I could continue addressing other IE issues like the fieldset, pre, and floats. Some people have mentioned other approaches, but I prefer fixing this approach before move on to a better method. It helps me to learn the idiosyncrasies behind CSS and browser implementation. In addition, it helps me when aligning the other CSS style with IE. Please give suggestions and lead me in the right direction. http://neville.f2o.org/Template_Sample.html Hi all, Compatibility with different browsers, link one and link looks good in ie but gets overlap in Firefox and too far apart in Opera. Does anyone know how to make this menu compatible with a least these tree browsers. Any help is greatly appreciated thanks. Code: <style type="text/css"> ul { list-style-type: none; margin: 1.0em 0 0 30px; padding: 0; position: relative; overflow: visible; height: auto; } ul li { height: 1.6em; width: 230px; } ul li a, ul li a:visited { width: 200px; display: block; color: black; text-decoration: none; background: yellow; margin: 0.1em 0 0 0; text-indent: 10px; padding: 3px;} ul li a:hover { display: block; background: green; color: black; } ul li a.currentpage, ul li a.currentpage:visited { background: red; color: black; padding: 3px;} </style> <ul> <li><a href="menu3.html" class="currentpage">Main page </a></li> <li><a href="page2.html">Dummy page 2</a></li> </ul> http://www.sphinxgaming.com/OpportunIT/?page=home In any browser except IE6 the footer floats just above the bottom of the page, but in IE6 it goes WAY down. Here is the CSS code: Code: html { height: 80%; } body { min-height: 80%; height: 80%; } A:link {text-decoration: bold} A:visited {text-decoration: bold} A:active {text-decoration: bold} A:hover { text-decoration: bold; color:#307D7E; } #container { width:80%; height:100%; margin:0 auto; text-align:center; font:helvetica; display:block; } #header { width:auto; display:block; font-weight:bold } #body { width:auto; font:14px "Helvetica"; text-align:left; min-height: 124%; display:block; background-color:#BDEDFF; } ul#navbar { background:url(images/navbg.png) repeat-x left top; margin:0; border-bottom:1px solid #00CCFF; border-top:1px solid #00CCFF; list-style-type:none; height:31px; } ul#navbar li { float:left; } ul#navbar li a { display:block; padding:5px 15px 4px; font:bold 16px "Helvetica"; text-decoration:none; color:#151B8D; letter-spacing: -0.1em; } ul#navbar li a:hover { color:#151B54; } ul#navbar li a#current { border-bottom:1px solid #00DDFF; border-top:1px solid #00DDFF; color:#151B54; font:bold 16px "Helvetica"; } #titlebar { width:auto; background-color:#BDEDFF; padding-bottom: 5px; text-align:left; font:bold 19px "Helvetica"; display:block; } #footer { width:auto; display:block; background-color:#AFC7C7; } I have CSS that works great in FF, but then when I go to check it all out in IE, it looks like s it (if you know what I mean...) Heres my CSS: Code: input.submitbutton { color:#FFFFFF; background-color:#33CC00; background-image:url(../images/buttonbg.gif); border: 1px solid #598527; } (The image tags arent working I guess, so heres the links to them...) and heres the outcome in FF http://img214.imageshack.us/img214/1048/coolffkw9.png and then the outcome in IE... http://img214.imageshack.us/img214/342/ffof5.png I think it does this because the buttons in IE get rendered the same as windows vista does it, and in firefox they are rendered differently? I'm not sure. Anyway, how can I fix this horrible mistake to make it look the same as it looks in Firefox? Thanks a lot guys. I've decided to make a thread to ask for help on my journey of recoding my design to CSS/XHTML tableless. I understand you all do this out of the goodness of your hearts, so I hope you don't take this as a "I demand assistance" thing. (original layout -> Here ) http://www.gaminghybrid.com/wii-style.html The current issue is the menu items. In FireFox 2, it looks perfect. The right proportions and everything. However, in IE7, between the menu header and the first menu item, there is some strange spacing. What could be causing this? For now, all my CSS is on the page, where I'll have it be in a CSS file once I've completed. Thanks in advance It's about time I moved away from the incorrect table layouts and help contribute to a better web. I posted a temp URL for a site he http://www.welcome-home-interiors.net/index2.php I'm having three issues, and I hope someone can help out with one (or all): If you're resolution is higher than 1024x768 resolution, the site appears fine, but if you're at 1024x768 or lower, the page does not scroll. Another issue is that in IE6 & 7 the navigation tabs work fine, but in Firefox all you see is the "HOME" tab (no other ones). The final issue is that in IE6 the main content's text is right up against the main content's picture, but in IE7 & Firefox THAT issue is fine. Here is a link to the CSS file that I'm using: http://www.welcome-home-interiors.n...udes/styles.css Thanks so much for any help that can be offered!... I do a lot of we development work for an intranet site. All users are on IE. Occasionally, I'll develop a page that looks fine in my browser (IE 8.0.6001) but not in others (8.0.7600). I have to set mine to compatibility mode to see what others see. I thought the compatibility mode was meant to display a web page the way it would in an older browser. Is it possible that I have something installed on my machine that makes my browser render pages differently? I know this is vague, but I am just wondering if anyone has ideas on where to look. Hi, I haven't worked with CSS since before the whole Firefox craze and I'm having some compatibility issues when it comes to getting my website to work properly in both IE, Firefox and Safari. I was able to achieve the perfect layout in IE but Firefox and Safari just throw it all out of whack. Are there way to ensure the same output (like linking to W3C or something) or perhaps I'm just doing something wrong. I've posted my code and you can see the difference I'm talking about in both browsers. Code: <!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" /> <style type="text/css"> <!-- /* GRID PLACEMENT */ html, body { height:100%; text-align:center; margin:0; padding:0; } div { display:block; } div#holder { width:800px; height:100%; margin-left:auto; margin-right:auto; } div#links { width:inherit; } div#page { border:2px #4a86b2 solid; width:inherit; height:inherit; padding:1px; } div#page div { width:inherit; } div#header { height:75px; } div#divider { height:20px; } div#content { height:80%; } div.left { height:100%; float:left; width:180px; border:1px white solid; } div.right { height:100%; float:right; width:610px; border:1px white solid; } div#footer { height:20px; border:1px white solid; } /* GRID COLORS */ div#header, div#footer { background:#000066; } div#divider { background:#6392e6; } div#content div.left { background:#a5be00; } --> </style> </head> <body> <div id="holder"> <div id="links">1</div> <div id="page"> <div id="header"> <div class="left">1</div> <div class="right">1</div> </div> <div id="divider"> <div class="left">1</div> <div class="right">1</div> </div> <div id="content"> <div class="left">1</div> <div class="right">1</div> </div> <div id="footer">1</div> </div> </div> </body> </html> I'm working on reworking my flash site into a CSS/HTML site. Tired of dealing with flash. Anyways....I am working on this page currently and am having trouble getting 3 divs to line up properly in IE. They look great in Firefox! Take a look and let me know if you have any ideas. Any help is much appreciated. Here's the link www .crealities.com/2008/inspiration.htm Hello, I have my CSS nav bar working perfectly in FF but in IE it is moved over too far to the right. I have no idea what is causing the difference but have tried a lot of stuff with no luck. I am pretty new to CSS so it could be a minor thing...thought you guys might be able to help! You can see the nav bar at stratastones.net Hello, I've got a question about CSS3. That are the correct procedures to make my CSS code compatible with all the browsers ? For example, I want that the elements of my website stay identicals on all the browsers. Thank you in advance ! |