CSS - Odd Border Rendering In Ff ??!
Hi there. I have discovered something odd in FF - When rendering borders, the FF engine has a strange offset.
If you have the border-top:none; then the right border is exactly 1px higher than the left border. Have anyone experienced the same problem ? - Emil Similar TutorialsHi. Have created some simple tabs using table cells. Active tab should have bottom-border color equal to page background-color. Non-active tabs should have bottom-border=black. Works fine in IE, but does not work very well in Firefox. If I remove the border-collapse:collapse on the table, then firefox also work... but I would like to be able to keep the 1px border between each table cell. So is there a way to make this work in both IE and Firefox... and hopefully most other browsers... See code below: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <style type="text/css"> a.menu_top:link {color: #000000; text-decoration: none;} a.menu_top:visited {color: #000000; text-decoration: none;} a.menu_top:hover {color: #000000; text-decoration: none;} a.menu_top:active {color: #000000; text-decoration: none;} td.menu_top_passive { background-color: #777; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #000000 solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } td.menu_top_active { background-color: #bbb; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #bbb solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } </style> <script language="JavaScript"> function change(id, url) { for (i=1; i<6; i++){ eval("document.getElementById("+i+").className='menu_top_passive'"); } eval("document.getElementById("+id+").className='menu_top_active'"); } </script> </head> <body style="margin:0; padding:0; background-color:#bbb;"> <br><br> <center> 1. Load the page.<br> 2. Click Item 4.<br> 3. Click Item 2.<br><br> Why is the bottom border of the menuelements (table cells) not getting correct in Firefox?<br> None-active menuelements should have a border-bottom = black, active should have same bottom-border as page.<br> Notice that I use border-collapse on the table in order to get the cell-border 1px thick between the menuitems.<br> If I remove border-collapse, then there is no strange behaviour in Firefox.<br> Any way to get this working in Firefox without breaking it in IE? </center> <br><br><br> <table border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse;"> <tr> <td id="1" nowrap class="menu_top_active" onClick="change('1');"><a href="javascript:;" class="menu_top">Item 1</a></td> <td id="2" nowrap class="menu_top_passive" onClick="change('2');"><a href="javascript:;" class="menu_top">Item 2</a></td> <td id="3" nowrap class="menu_top_passive" onClick="change('3');"><a href="javascript:;" class="menu_top">Item 3</a></td> <td id="4" nowrap class="menu_top_passive" onClick="change('4');"><a href="javascript:;" class="menu_top">Item 4</a></td> <td id="5" nowrap class="menu_top_passive" onClick="change('5');"><a href="javascript:;" class="menu_top">Item 5</a></td> </tr> </table> </body> </html> I'm a little puzzled by this weird display bug by IE7, this bug doesn't occur in IE6. It had to do with the DIV's CSS's border-style. If you set it to double then you notice some random bugs with it. Some of the time, the border is displayed without a problem. Some of the time, it is displayed with some gaps in the line as if it is not being drawn upon. Some of the other time, it is not displayed at all. I noticed if I switch from one tab to another then back, the border appeared as if nothing had happened. I also noticed that if I open the view source that overlapp the web browser then closed it, the border appeared as if nothing had happened. How do you fix that problem? Thanks... Hi, This used to be my solution: Code: <table border=1 bordercolorlight='#CCCCCC' Bordercolordark='#FFFFFF'> But this only works well on IE - not Mozilla Now I want to use CSS: Code: .results { border: 1px solid #CCCCCC ; } Code: <table class='results'> --------------- The problem is, with CSS, only the TABLE acquires the border property. The cells within it don't. If I specify Code: <td class='results'> for all the cells in the table, this also won't work, because the cell borders overlap each other and some border lines seem thicker than others (because of overlapping). Is there any simple way I can specify the border property for the table - in ONE declaration? I want the table and td borders all to be a simple 1px width ...is that possible in one declaration? Thanks a lot! I would like to set up a table with a different border than the cells inside it. Here's my code: 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=utf-8" /> <title>Untitled Document</title> <style type="text/css"> TABLE {border: 1px solid black; border-collapse: collapse; width: 200px} TD {border: 1px solid #ccc} </style> </head> <body> <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> That's all hunky dory in (gasp!) IE, but good browsers...they only show the lighter gray color. How do I get the table border to be different? 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 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. Hi I am completely stumped by this. My CSS is not rendering in FF, I am running FF on a mac. Two pages, they are nearly the same, but show one display Css and the other does not - No CSS and With CSS I have been going crazy trying to find out what is wrong. The CSS link is here Thanks Jake Here's my page: dev.papatime.rewards.openi.com/rewards09/ NOTE: As new member I am not allowed to post a link, so please add h-t-t-p:// Looks great in FF, Chrome, and Safari. In IE8 the grey box at the top of the right hand column is not aligned to the top, throwing off the whole page. You can see the HTML by viewing source of the page, and I will include the relative CSS below. CSS of the container: .twoColFixRtHdr #container { width: 801px; background: #FFFFFF; margin: 0 auto; border: 0px solid #FFFFFF; text-align: left; } CSS of the main column: .twoColFixRtHdr #mainContent { margin: 0 274px 0 0; padding: 0; width:527px; } CSS of the sidebar: .twoColFixRtHdr #sidebar1 { float: right; width: 261px; padding-top: 0px; text-align:center; vertical-align:top; position:relative; } Been banging my head against a wall for hours on this, any help would be GREATLY appreciated! 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 http://codymays.net/~private_ftp/theed When viewing this page in IE6, I see the background of the content div rendered below the footer. The second you select all, click on another window and click back, or minimize the maximize the window, it goes away. Is this a problem with my code or a bug in IE (because it works in IE7). Either way, what should I do to go about fixing it? 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 My navigation displays correctly in IE 7+ and Mozilla Firefox, however in IE Under 7 the navigation places a double line and adds additional padding to the navigation. Does anyone have a remedy for this problem? I have a onMouseOver event that draws a top border over text. This works fine with Mozilla/Firefox, but it doesn't render in IE. I think I know why -- it's because I used CSS to position the text beforehand, and in IE it doesn't bother drawing the top border because it's out of the text's bounding box, right? So, how do I fix this so it works in IE? I've posted a sample page with the problem he http://aaron.verge-rpg.com/vergebrd/test.html Any help would be appreciated. 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> 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 Hi, Does anyone have any Ideas how to fix the two rendering bugs shown in the screenshots below? In IE5.5 The two top bars that stretch across the screen stretch too far distorting the page slightly. (Circled in red). http://www.explosiveracing.net/test/render_bugs/ie55.jpg In NN6 the backgrounds on the table cells do not fill correctly looking unsightly. (Circled in red). If you compare this to viewing the site in FF then you can see what I mean http://www.explosiveracing.net/test/render_bugs/nn6.jpg Site: http://www.explosiveracing.net/test/ First of all I just updated my Dreamweaver from 2004 MX to CS4. I have not used CSS before. I now want to update my sites to XHTML 1.0 Transitional and thought I would start using CSS. I am having trouble with the text losing or changing color and size once it gets posted. It looks fine in browser preview. So first some general questions. What is the difference between assigning properties to heading or class? Do I or should I use both the heading and class on a bit of text? Do I attach the style sheet to the template or to just the pages? All my pages are made from one template. I have several books, that tell how to create style sheets, but not what to do with this problem! Thanks, Jill Hi there, I have the following in my css file: } #headerBannerWrapper { background-image: url(/GREENLOGO.jpg); background-position: bottom left; background-repeat: no-repeat; background-color: #DEF2B0; padding: 0px; margin: 0px; } #headerBannerWrapper img { padding: 0px; margin: 0px; vertical-align: bottom; However the banner doesn't get rendered in IE7. It renders OK in IE8 Any help most appreciated. The above is linked to the following class: .clearFix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; NB If the banner has content inside then it renders OK, however if there is no contents inside then the banner (green background) is not displayed. 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? |