CSS - Cross-platform Rendering Issues
Right up front, here's the CSS/markup I am concerned about:
http://www.triple-bypass.net/testpage.htm http://www.triple-bypass.net/testpage.css It consists of a simple div with a colored background, and a couple anchor elements sitting on top of it. The anchors are treated as blocks, making this a nice little menu. The problem is that multiple platforms are displaying the anchor boxes in different places. Right now, it looks fine in Firefox 1.5.0.6 on WindowsXP. The anchor boxes stick up about 2 pixels in Firefox 1.5.0.6 on Mac OSX Tiger. And the anchor boxes stick down about 3 pixels in Firefox 1.5.0.6 on Linux. Here's a screenshot from Firefox on Linux: URL (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text) My guess is that each platform is setting a different baseline for the anchor text, and growing the padding box around it from there. The "top" value that works on Windows, therefore, does not work on OSX or Linux. The simplest 'solution' would seem to be "Forget Linux and OSX, they're of no concern in the Windows world". However, as an alternative OS advocate, this is something I cannot do. I'm not too concerned about supporting other browsers, but supporting one browser across platforms is important to me. So has anyone had any experience with this? Is there a way to fix it? Or a hack to get around it? Similar TutorialsHTML Code: <div id="nav"> <ul> <li class="first"><a title="#" href="#">About Company</a></li> <li><a title="#" href="#">RRR News</a></li> <li><a title="#" href="#">Apartment Communities</a></li> <li><a title="#" href="#">Commercial Properties</a></li> <li><a title="#" href="#">Current Developments</a></li> <li class="last"><a title="#" href="#">Resident Login</a></li> </ul> </div> CSS Code: /*** Main Navigation Styling ***/ #nav { border-top: 1px solid #897409; border-bottom: 1px solid #897409; background:#fff url(../images/nav_off_back.jpg) repeat-x center; height: 29px; } #nav ul{ font-size: 17px; margin:0; float:left; text-align:center; width:100%; } #nav li { display:inline; margin:0; float:left; list-style: none; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; min-height: 27px; height: 27px; line-height:27px; padding:1px 0; } #nav li.first { background:url(../images/nav_bars.gif) left center no-repeat; padding-left:2px; _margin-left:24px; } #nav li.first a, #nav li.first a:link{ border-left:0; } #nav li.last { border-right:1px solid #fff; } #nav li a { color: #000; text-decoration: none; text-align:center; min-height: 27px; height:27px; padding:6px 17px 6px 17px; border-right:1px solid #b49f36; border-left:1px solid #fff; } #nav li a:hover { text-align:center; background: url(../images/nav_on_back.jpg) repeat-y center; color:#fff; min-height:27px; height: 27px; padding:6px 17px 6px 17px; } This code produces a centered horizontal navigation menu in FireFox Mac and IE6 PC. However, in FireFox PC the whole menu is shifted a bit to the right off-center (about 15 px). In IE7 PC, the menu sits on the left and is not centered at all. I am willing to use a browser sniffer to fix the IE7 problem, but I'm not sure what to do for Firefox. The PC and Mac versions of Firefox usually play nice, but not this time. I'd rather not use both a platform AND browser sniffer, but I'm running out of ideas. The addition of a pixel-specific line-height for #nav li { helped some earlier issues, but did not fix them all. Having an odd rendering problem involving centering content in a fixed-width right hand column that lies within a fixed width centered master content div. Take a look at the template he http://www.ipfwcommunicator.org/devindex.php At first I tried to center the content using align="center" in the HTML markup, which I know is a no-no, so I'm not too sad it didn't work. I then tried {margin-left: auto; margin-right: auto;}, thinking it would work in IE as it does with tables, but it did not. Both of these attempts worked worked with most modern browsers (Moz/Firefox/Safari/NN7) but failed on MSIE5/Mac and IE6/Win. Nice and compliant, and I would be happy in a perfect world, but alas, 90% of my readers use a (vastly) imperfect browser. I decided to get a bit more professional and utilize CSS positioning, setting the DIVs that hold the content boxes (i.e., Weather/Search/etc.) as {position: relative; left: 15px;}This also worked in most browsers, but oddly enough on IE5 Mac (and assume IE6 win although I didn't have a chance to test) the boxes centered but the tables inside the weather/search boxes that allow for cross-platform formating jutted out the side. Lastly, and this is the current solution, since the column is fixed width and the boxes are fixed width, I used the "ice" solution of dividing the remaining margin by two, and setting margin-left: equal to that. In this case: {margin-left: 15px;} Oddly enough this works FINE on everything, even IE5/Mac, but doesn't work on IE6/Windows, which instead results in what appears to be 5 or 6px more than the defined 15px. Compare here between Firefox and IE6 and you'll see it. And CSS is here So the question: What IS the best way to center up those boxes in that column? This is my first major CSS undertaking, having worked with nested tables up until now, so any pointers on my bad markup will be gladly accepted Thanks in advance, Aiden Hi guys, I am in the process of refreshing my site however cannot seem to figure out a specific iOS rendering issue. On iOS devices (I have tested on an iPad and a iPhone 4), the menu on my website displays on the first visit, but then disappears. I cannot reproduce this on a regular desktop browser, but can reproduce the rendering issue on the iOS simulator. The CSS file is located here and the corresponding validator result link is here. This is what it looks like on first visit: And this is what happens when I refresh the page: I'm really at a loss to understand where I might be going wrong, and would be grateful for any assistance. The CSS rules for the menu specifically a Code: /* !Navigation */ #menu {background: #393 url(../images/menu.png) no-repeat !important; width: 744px; height: 40px; position: relative; margin: 170px 0 0 0; padding: 0;} #menu li {float: left;} #menu li a, #help li a {position: absolute; margin: 0; padding: 0; display: block; text-indent: -9999px; overflow: hidden;} #menu li a {height: 40px;} /* Normal State */ li#home a {left: 0; width: 79px;} li#about a {left: 84px; width: 75px;} li#journal a {left: 164px; width: 89px;} li#origami a {left: 258px; width: 97px;} li#stuff a {left: 360px; width: 65px;} li#links a {left: 430px; width: 65px;} li#contact a {left: 500px; width: 93px;} /* Hover & Current State */ li#home a:hover, #snkhan_home li#home a {background: url(../images/menu.png) 0 -40px;} li#about a:hover, #snkhan_about li#about a {background: url(../images/menu.png) -84px -40px;} li#journal a:hover, #snkhan_journal li#journal a {background: url(../images/menu.png) -164px -40px;} li#origami a:hover, #snkhan_origami li#origami a {background: url(../images/menu.png) -258px -40px;} li#stuff a:hover,#snkhan_stuff li#stuff a {background: url(../images/menu.png) -360px -40px;} li#links a:hover, #snkhan_links li#links a {background: url(../images/menu.png) -430px -40px;} li#contact a:hover, #snkhan_contact li#contact a {background: url(../images/menu.png) -500px -40px;} Any suggestions welcome! Saj Hey everyone, The site in question is roadmasterusa.com We've got a site developed that looks acceptable in most browsers, with the exception of Opera and IE8 (though we were able to put in the modify header to roll back to IE7 rendering). The problem is the positioning of the navigation, and some of the other page elements. Now I have been unsuccessful in finding any way about this other than to not support Opera, but we don't want to miss out on that 1% of visitors. I've spent quite some time trying to figure out how to get this site to render right; now I need some expert help. I look forward to anything you suggest. -Troy Oltmanns On this site http://www.freewaytransmissions.com I am having issues with the spacing on the navigation. The nav is an ul and I used inline css for spacing the links apart, but as you see in Chrome they are spaced correctly, but in IE they are not aligned correctly. If someone can shed some light I'd appreciate it. Thanks. Tom Hi there, I am reposting this question after removing the extraneous items from the site. Basically, I can get things to line up in either IE or FF, but not both, I have managed to solve this with past sites, but can't seem to figure this one out! Currently I have it set so it is correctly displayed in IE: http://www.kohlrbaby.com/vcc/portfolio/portfolio.htm Please, please help me to figure out how to do fixes for this issue, I have been searching online but can't seem to figure it out and am very frustrated! Thanks so much and here is my CSS: body { margin: 0px 0px 30px 0px; padding: 0px 0px 0px 0px; font-family: verdana, arial, helvetica, sans-serif; color: #000000; background-color: #999999; text-align: center; } #title{ margin-top:0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; position: relative; float: left; clear: left; } #rightBox { border-right: 2px solid #666666; width:625px; padding: 0px; border-top: 2px solid #666666; border-bottom: 2px solid #666666; border-left: 2px solid #666666; margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; background: #ffffff; } .mainPic { margin-top: -475px; margin-bottom: 0px; margin-right: 0px; margin-left: 30px; position:relative; float: left; clear: left; z-index: 100; } img.pic{ border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; } PS: i know I don't need to have all my margin positions shown (ie: may eventually become margin: 0px), however I have kept it like this until I figure out what my problems are. I have this design: http://www.thewildlifemuseum.org/designs/25/content.html Code is below. Styles are mostly within the tags. IE 6 is currently the working browser, while Firefox has the obvious problem of being too wide. I really want to be able to put that curve in but won't be able to as it currently is. Any suggestions as to how to fix it? Code: <html> <head> <title>The International Wildlife Museum</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> BODY,HTML {height:100%;} BODY {margin:0; font-family:Arial,Helvetica,sans-serif; font-size:16px; background-color:#D9A156;} #header {text-align:center; background-color:#4A308C; padding:10px; height:144px;} #middle {background:url("images/gradbg.gif") repeat-x; width:100%;} #menu {background:url("images/gradbg.gif") repeat-x;} #footer {} </style> </head> <body> <div id="header"><img src="images/header.gif" alt="International Wildlife Museum: Tucson's Natural History Museum" width="465" height="144"></div> <div style="position:absolute; left:0; top:164px; width:170px; height:467px; z-index:5;" id="menucontainer"> <img src="images/menu/menucontainer.gif" width="170" height="373"> <div style="position:absolute; left:10px; top:15px; width:160px; z-index:30;" id="menutext"> Design<br> Design<br> Design </div> </div> <div id="middle" style="position:absolute; left:0; top:164px; height:370px;"><img src="images/gradbg.gif" width="3" height="370"> <div style="position:absolute; left:764px; top:13px; width:36px; z-index:20;" id="trcorner"><img src="images/trcorner.gif" width="36" height="34" alt=""></div> <div style="position:absolute; left:101px; top:13px; width:699px; border:solid 3px #000000; background-color:#FFFFFF; padding-left:69px;" id="body"> <div id="content"> <span style="font-size:180px;">N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br></span> </div> </div> </div> </body> </html> Hello all, I have a really anoying alignment issues with fire fox and IE. Have a look at the follwoing page in both browsers: http://pfwd.org.uk/style.htm I need to get IE to display what Firefox shows. The four rows on the left hand side (date, date value, number and number value) need to be aligned with the rows Descirption and description value. Please note not all style code is in the external stylesheet external CSS file: PHP Code: body{ background-color:#006699; font-family:Arial, Helvetica, sans-serif; } .main, header, subHeader{/*Positon values that make every thing go inside the main box */ position:absolute; left:100px; } .main, subHeader dbItem{ border: solid 1px #0099CC; } .main, header{ top:125px; left:140px; width:451px; } .main{ height:300px; } .header{ background-color:#0099CC; font-size:12px; font-weight:800; } .subHeader{ height:22px; width:200px; border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } .dbHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 50px; } .dbItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; } .dbdescripHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 364px; float:right; } .dbdescripItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; width: 390px; float:right; height:48px; } .link{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:2px; color:#0099CC; text-decoration:none; float:right; } .links{ background-color:#006699; border: 1px solid #0099CC; border-top:1px solid #0099CC; color:#0099CC; text-decoration:none; padding:0 2px; } .link a:hover{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:0 2px; text-decoration:none; color:#FFCC66; background-color:#006699; } br{ margin-top:-15px; } .subsubheader{ border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } page file: PHP 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> <title> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style.css"type="text/css" /> </head> <body> <div class='main'> <div class='header'>Updates to the site</div> <div style='margin-bottom:20px;'> <div class='subHeader' style='height:22px;'>Search for an update</div> <div class='dbItem' style='left:180px; width: 239px; float:left; height:22px;'> <form name="search" method="post" action="post"> <select name="Year"> <option>Year</option> <option>2005</option> <option>2004</option> <option>2003</option> <option>2002</option> <option>2001</option> <option>2000</option> </select> <select name="Month"> <option>Month</option> <option>January</option> <option>Febuary</option> <option>March</option> <option>April</option> <option>May</option> <option>June</option> <option>July</option> <option>August</option> <option>September</option> </select> <input type="submit" name="Submit" value="Search" /> </form> </div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>First set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>one</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem' >Second set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>two</div> <div class='dbHeader'>Date</div> <div class='dbItem' >10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>third set of infroamtion from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>three</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <!-- End on the fly scripts --> </div> </body> </html> URLS css: http://pfwd.org.uk/style.css page: http://pfwd.org.uk/style/htm Can any one help me sus out the alignment issues? thanks pfwd i really like the fieldset due to having the title in the middle of the border, but are there any cross-browser issues? also what i'm finding is that if i set background styling. IE sets the background colour to include the legend aswell, whereas Firefox sets the background colour to the confines of the border. Ideas welcome and asked for Effective Alternatives also welcomed Hi all, Just made a tables site runs oke on a pc but not on a mac. So now i want to create a mac-css. How can i include the right css-file based on an user platform????? Javascript or php?? I cannot figure this out. I've tried adding clear: both in several places, I've tried overflow: hidden and I've tried cursing. Nothing works! How can this be fixed so that in IE6 the divs are not staggered vertically?? Code: <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="38" border="0"></div> <div style="float: right; height: 38px; width: 102px;">copy</a><br>copy</a></div> </div> <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="19" border="0"></div> <div style="float: right; height: 38px; width: 102px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="8" border="0"></div> </div> Hi guys, pretty new to CSS layout, and recently created a site for my girlfriend. I used 960 grid system to handle my layout css, and it renders perfectly in safari/FF/IE7+... after I installed IE Tester, i realized that IE6 wasnt rendering properly. The menu and z-index stuff arent appearing correctly. If anyone can have a quick look and let me know where my code is causing issues it would be a great help. I'm not allowed to post the URL, as im a new user, but I guess I can send through PM if you want to have a look? Thanks a bunch. Greetings everyone! I've been working on the following page for a couple of days now, and it looks fine in Safari and Firefox, but all my CSS fail in IE. I don't know what the problem is. Feel free to view the page at the following url http://www.netunification.com/demo/ I spoke with a friend and he speculates IE is having problems with the float command. I'm not so sure of this because I used the same CSS techniques while building the following site (http://www.the904.com/demo/). The904 page renders perfectly in IE and I can't figure out what the difference is between the pages. I thought I used the same concept with both pages. I've been trouble shooting the problem for a couple of days now, but I haven't had any luck. Can please someone take a look at my net u page (http://www.netunification.com/demo/) and suggest a solution Thanks in advance for any/all assistance. Your time and effort is greatly appreciated! Walt Hello, I am using ASP.NET to create a web application. I HAVE to use a master page which means that I do not have complete control over the rendering. The trick is, the master page defines a menu at the top of the page. I need to create a table that dynamically fills the contents of the REMAINDER of the screen. If there is any overflow, I want to scroll the contents. Does anyone know how I can have the table fill the REMAINDER of the screen? I can nest DIVs and such once I have that outer table. Thank you! Crystal Hey, I came across this forum and hopefully somebody can help me. Here is my website: http://www.jmuelectricmotorcycle.tk When the page is in firefox, If you page zoom out, the navbar goes under the content instead of staying on the right. I think it has something to do with padding and the sidebar not having enough room so it drops down. When I set the content to 1005 instead of 1000, it works, but there's a giant 5 pixel gap between my side bar and my content container. Also, does anybody know how to style called data from ssi.php in SMF forums? I want my login boxes to look like my main page. Thanks. Here is my css: Code: html { font: normal 12px verdana, arial; background-color: #000 } body { text-align: center } #fw-container { margin: 0 auto; width: 1000px; text-align: left } .hasSidebar #fw-container { width: 1000px; } a, a:visited { text-decoration: none; } a:hover { text-decoration: underline; } /* --- Header --- */ #fw-head { position: relative; height: 196px; background: #242424; } #fw-title { font: bold 26px verdana; letter-spacing: -1px; position: absolute; top: 20px; left: 20px; padding: 0; margin: 0; z-index: 10; } #fw-title a, #fw-title a:visited, #fw-title a:hover { color: #fff; } .fw-logo { width: 760px; height: 196px; position: absolute; } .hasSidebar .fw-logo { width: 1000px; } /* --- Navigation --- */ #fw-mainnavwrap { background: #242424; padding: 10px 20px; font-family: arial; font-weight: normal; border-top: 1px solid #000; border-bottom: 1px solid #000; } #fw-mainnavwrap ul { margin: 0; padding: 0; background: transparent; list-style-type: none; } #fw-mainnavwrap li { margin: 0px 15px 0px 0px; display: inline; } /* --- Content --- */ #fw-bigcontain { width: 760px; float: left; } .fw-paragraph { background: #242424 url('../Waveform/img/bg-p.gif') repeat-x top left; border-bottom: 1px solid #000; padding: 15px 20px 10px; overflow: hidden; } .fw-title { margin: 0px 0px 10px; font: 18px verdana; color: #fff; } .fw-text { margin-bottom: 10px; } /* --- Sidebar stuff --- */ .hasSidebar #fw-sidebar { width: 239px; float: right; font-size: 12px; clear: right; border-left: 1px solid #000; } #fw-sidebar .fw-title a, #fw-sidebar .fw-title a:visited, #fw-sidebar .fw-title a:hover { color: #fff; text-decoration: none; } #fw-sidebar .fw-title { font-size: 1.3em; font-weight: normal; } /* --- Footer --- */ #fw-footer { font: normal 10px verdana, sans-serif; background: #242424; margin: 0px; padding: 11px 0px 1px; color: #999; clear: both; width: 760px; } .fw-footertext { background: #161616; border-bottom: 1px solid #000; border-top: 1px solid #000; margin: 0px; padding: 6px 0px 6px 20px; } I have run into a problem in 2 of my pages in IE they Render fine in Firefox but in IE you cannot see the top part of the text and in some you don't incounter this problem. but when you refresh page the Title and author and the top text will not show in IE just disapper and it will show up when you Scroll or Highlight the text. I been trying to figure out this problem for quite sometime now. The First Page Second Page Code: .top_article_pic { float:left; margin: 0 9px 0 0; } div#articles_bg { width:850px; background:#2A475F; padding:24px; } div#articles_page { background:#FFF; border:1px solid #000; padding:12px; } div#articles_page2 { height:800px; background:#FFF; border:1px solid #000; padding:12px; } span.h1 { font-family:Arial,Verdana,Sans-serif; font-size:2em; color:#2A475F; font-weight:bold; } span.author { font-family:Arial,Verdana,Sans-serif; font-size:.9em; font-style:italic; color:#2A475F; } div#articles_page p.main_article { margin:18px 0 0 0; font-family:Arial,Verdana,Sans-serif; font-size:.8em; color:#000; } div#articles_page p.main_article_p{ width:500px; margin:18px 17px 0 0; font-family:Arial,Verdana,Sans-serif; font-size:.8em; color:#000; float:left; background:#FFF; } img.right_thumb { border:1px solid; } p.click_enlarge { font:.8em Arial,Verdana,Sans-serif; color:#2A475F; } div#articles_page p.main_article_p2{ margin:12px 0 0 0; font-family:Arial,Verdana,Sans-serif; font-size:.8em; color:#000; background:#FFF; } img.right_float { float:right; margin:0 0 0 15px; border:1px solid #000; } p#left_article { margin:10px 0 0 0; color:#000; font:.8em Arial,Verdana,Sans-serif; } p.article2 { margin:9px 0 0 0; text-align:justify; font:.8 Arial,Verdana,Sans-serif; width:530px; font:.8em Arial,Verdana,Sans-serif; } div.right_pic { width:161px; padding:10px; font:.8em Arial,Verdana,Sans-serif; color:#2A475F; margin:0 10px 0 0; float:left; background:#ccc; border:1px solid #000; } Thanks in Advance If you look at my page here in IE and Firefox, you'll see that the footer is stretched in IE. It's barely showing the image, but flooding over into the center of the page. I have no idea why it'd be doing this. View in IE View in FF Here's the CSS used : Code: #footer { background: #49515C url(img/header_right.gif) no-repeat 100%; border-bottom: 5px solid #fff; border-top: 10px solid #fff; text-align: center; color: #fff; font-size: 0.8em; padding: 10px; line-height: 16px; clear: both; } Can anyone see a problem? when i dont turn of cache in IE my website seems to forget some css rules half of the time its really annoying cause i only see it when i browse the site on the server not local...and only when caching is turned on i use the equal heights columns technique from positioniseverything.net the site having the problem is here the problem is visible on the home page....i think around 1/5th of the clicks... then the link in the top left content box that should be absolute; bottom:0; just crawls up to the text.... like my question is WHY?? does it only do it sometimes Surprise, surprise. I'm using a very simple example of a tabbed interface. Each tab is its own div with a border and a bgcolor. As you will see, IE is displaying the tabs such that they hang 1px over their background container while FF displays as expected. I'm thinking it has something to do with the float but can't seem to figure it out. Any ideas? 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> .hdr { background-color: #ccc; } .tab { padding: 0px 5px; background-color: #666; border: 1px solid #000; border-bottom: none; color: #fff; float: left; } .tab.active { background-color: #fff; color: #000; margin: 0px 3px 0px 3px; } </style> </head> <body> <div class="hdr"> <div class="tab active">tab 1</div> <div class="tab">tab 2</div> <br style="clear: both" /> </div> </body> </html> |