Browser bugs I’ve found
A list and links to test cases of browser bugs I’ve come across. If there are any work arounds they are indicted. I expect this list to grow, but, since so many people are ahead of me on this there might not be that many left to ﬁnd.
- Bugs in multiple browsers
- Firefox bugs
- Internet Explorer bugs
- ie6, ie 7, ie8 & 9 have 4095 upper limit on the number of selectors in a css ﬁle.
- ie7, ie8 & 9 :hover on any element does not work correctly whith forms
- ie 5.5 & 6 Incorrectly sets the left origin of the positioning coordinates
- ie 5, 5.5, 6 & 7 move an unﬂoated element to the position as though it had also been ﬂoated
- ie 5, 5.5 & 6 If the calculated height of a relatively positioned block is an an even number or the calculated width an odd number. Then any element positioned absolute inside that block using bottom or right will be 1px out.
- Opera bugs
- Containing ﬂoats (ﬁxed in Opera 8)
- Opera not recognising ’ and ‘ entities (ﬁxed in Opera 8)
- Safari bugs
Bugs in multiple browsers §
Browser don’t implement font-variant-ligatures. The css Fonts Module Level 3 defines the
font-variant-ligatures property to specify which ligatures should be used. Currently no browser fully supports all values of this property. §
|font-variant-ligatures:||Chrome 10||Firefox 4 – 10||ie 8||ie 9||Opera 11||Safari 5|
Browsers don’t implement font-weight consistently. The font-weight property in css specifies numeric values as well as keywords. Until recently browsers did not do much with the numeric values. I’ve created a test case. §
It is important to note for this to work you need a font with all the appropriate weights. I don’t have one but Helvetica neue comes close which is the one being used here.
|Browser||Font weight numeric values1||Keyword||Lighter||Bolder|
|Safari 4 & 5||yes||yes||yes||yes3|
Instead of implementing multiple weights the numeric values are mapped 100–500 same as normal; 600–900 same as bold.
Works on bold content which becomes normal but when applied to normal text does not become lighter.
When applying bolder to
font-weight: 300it remains light instead of being set to normal (is this a bug?).
Styling tables §
Browsers style tables poorly. Browser support for multiple css properties relating to tables — most notably the
colgroup and the
tr elements — is poor.
The table lists browses and properties. The row headings link to the test case for that property. Where a browser rendering is incorrect notes are after the table.
|Css poperty||Firefox 2 – 35||Opera 9||Safari 2||Safari 3 – 9 & Chrome||ie 6||ie 7||ie 8||ie 9|
|border on colgroup & col||yes||buggy1||buggy2||yes||no||no||yes||yes|
|border on tr||yes||yes||yes||yes||no||no||yes||yes|
|border on tbody||yes||yes||buggy3||yes||no||no||yes||yes|
|border on thead & tfoot||yes||yes||yes||yes||no||no||yes||yes|
|border-style: hidden on tr||yes||yes||yes||yes||no||no||buggy6||yes|
|border-style: hidden on colgroup||yes||yes||yes||yes||no||no||buggy6||yes|
|border-style: hidden on td||yes||yes||yes||yes||no||no||yes||yes|
|visibility: collapse on td & th||yes||yes||yes||yes||no||no||yes||yes|
|visibility: collapse on tr||yes||buggy4||buggy4||buggy4||no||no||yes||yes|
|visibility: collapse on colgroup||buggy5||buggy5||no||no||no||no||yes||yes|
|visibility: collapse on col||buggy5||buggy5||no||no||no||no||yes||yes|
Notes — I have not included properties that work in all the browsers tested so, background-color, color, borders on the td element and padding, since these all seem to work reliably.
Opera incorrectly places borders separating the thead and tbody sections.
Safari incorrectly places borders separating the thead and tbody sections it also draws a border around every column contained in the colgroup not just the colgroup.
Safari incorrectly places a border below the tfoot element.
The table row should not be rendered, subsequent rows should move up to ﬁll the space as though the row is not there.
The table column should not be rendered, subsequent columns should move over to ﬁll the space as though the column is not there.
Outline property the aﬀecting layout — Firefox 1.5, 2.0, 3 and Opera 90.1 (ﬁxed in opera 9.5) allow the outline property to aﬀect the layout of blocks. Accourding to the ccs 2.1 spec the outline property should have no aﬀect on layout. In Firefox 1.5 and Opera 9.1 this is not so. In both if the containing element is set to
overflow: auto then the outline is taken into account when positioning the block, while in Opera it aﬀects the calculated width of the block but not its position.
The test case demonstrates the bug, there should be no scroll bars and no red should be visible.
legend tags §
Recently I was trying to position
legend tags and got nowhere — so I’ve put together a small grid of what works and what doesn’t. To be honest not a lot does, see the table below. I have also made a few test cases and notes.
|Firefox 8 & 9||yes||no||yes||yes||yes||yes||yes|
|Firefox 1.5, 2.0 & 3||no||no||no||yes||no||no||no|
|Safari 2.03 – 5||yes||yes||yes||yes||yes||yes‡||yes‡|
General notes on the table — styling the legend tag is at best hit and miss, Safari seems to do the best job of it, while Firefox seems not to even try. Interestingly Firefox 1 seemed to do more than Firefox 1.5, although I didn’t add it to the table since it is no longer current.
- * positive margins — I’ve only tested positive margins since I couldn’t think of a good test for negative margins. Since positive margins are so poorly supported it seems unlikely that negative margins will work in any useful way.
- † These browsers alter the ﬁeldset’s height, the legend tag ends up in the correct location but it should not change the ﬁeldset’s shape.
‡ There are two interpretations of how ﬂoated legend tags behave, one used by Opera 8 and Internet Explorer, moves the legend to the appropriate edge of the
fieldsettag. The second used by Safari moves the legend down so that it is inside the ﬁeldset’s box as opposed to poking out the top like it does normally, Opera 9 now behaves in the same way as Safari. I think the ﬁrst behavior is correct.
- †† Something strange seems to happen to the hight of the fieldset when scrolling past. The field sets hight seems to decrease as the fixed position legend passes its fieldset.
A test case which illustrates the bug using the following code:
overflow: auto on list items (ﬁxed in Firefox 1.5). When an li element is set to overflow: auto Firefox creates a horizontal scroll bar in most cases. Short entries not containing block level tags don’t suﬀer from this problem. §
The work around is to wrap the content of a list item in a div and set the overﬂow on the div instead.
::first-letter is limited §
According to developer.mozilla.org there are a large number css properties that Firefox does not apply such as: hight, width, min-width, max-width, min-hight, max-height, line-height and text-decoration. This is problematic as it makes cross platform usage unreliable. I have made a test case
Styling of form elements in Firefox is frustratingly limited. §
In Firefox the ability to style form elements is surprisingly limited. The following elements ignore line-hight:
- <input type="button">
- <input type="submit">
- <input type="text">
- <input type="password">
- Test case
The button element has 1px of padding top and bottom and 3px on the left and right which cannot be removed. Test case.
Internet Explorer §
ie6, ie7, ie8 & ie 9 have 4095 upper limit on the number of selectors in a css ﬁle. Is this a bug? I’m not sure it might be better called a limitation. I’ve not found anything in the css specs mandating inﬁntly large style sheets and in fairness if you have got over 4095 selectors in your css ﬁle then you probably have other problems to worry about. §
This is quite a well know bug, but, I couldn’t ﬁnd a test case for it anywhere so I’ve written a simple test case.
ie 7, 8 & 9 :hover is buggy. When :hover is applied to an element the styling should still be applied when the mouse is over one of the children of that element. In ie 7 and 8 under certain conditions the styling is lost, speciﬁcally when hovering over
input elements. The bug is slightly tricky to trigger so I have made a screen recording to demonstrate. The video shows ie7, ie8 exhibits the same behaviour but the bug is easier to trigger. I have also created a test case. §
Not only is this bug still present in ie 9 it is worse, easier to trigger and flashes in a vomit inducingly fast way.
The key element to triggering the bug is the speed of the mouse pointer, it needs to be moving quite fast when entering the input, although not as fast over
input type=text for some reason. View the source to see the details, it is simple markup a
div containing three
type = submit, text and
div is styled to have a green background on
:hover and should stay green the entire time the mouse is inside its area. This does not happen constantly in ie 7 and 8.
ie 5.5 and 6 Incorrectly sets the left origin of the positioning coordinates to the edge of the content of the ﬁrst element of the containing block, instead of the edge of the relatively positioned containing block.
This occurs whether the preceding element has its left margin or left padding set. Strangely ie behaves correctly if the position is set relative to the right edge. It also behaves correctly if the containing block is positioned absolutely
ie 5, 5.5, 6 and 7 move an unﬂoated element to the position as though they had been ﬂoated. This only aﬀects the element immediately following the ﬂoat. §
Incorrect positions when using right and bottom ie 5, 5.5 and 6. If the height of a relatively positioned block is an an even number or the width an odd number, any element that’s positioned absolutely inside that block and use bottom or right will be 1px out. They will be either 1px too high or 1px to the left of their correct position. This depends on the width or height of the containing block. If both occur the positioned element will be incorrectly positioned on both axes. §
Containing ﬂoats inside overflow:auto (ﬁxed in Opera 8). When a block set to, overflow: auto, contains ﬂoats Opera does not contain the ﬂoats correctly. See Super simple clearing ﬂoats at Anne’s Weblog for an explanation of why this is useful and see css 2 spec as to why it should work. §
Opera not recognising ’ and ‘ (ﬁxed in Opera 8). When using a xhtml doc type Opera does not display anything. The numeric references ‘ and ’ work ﬁne. §
Safari defaults span attribute to 0 (ﬁxed in Safari 3). When the
colgroup element does not have any child
col elements and the span attribute is not set Safari defaults the value to 0. The
span attribute should default to 1. §
Safari crashes when the hover pseudo-class is used to generate content (ﬁxed as of at least version 2.0.4 (419.3)). In an experiment with generated content, I discovered that attempting to use position: absolute will crash Safari when the user hovers over the element. §
Since css 2 does not really cover positioning generated content this technique is of limited use, but it does work in Opera.