To be honest I've been fairly impressed with IE8 up until now.
It seems like they managed to solve most of the IE brand's infamous
behavior.
However I just found one strange IE8 specific bug and also the
solution so thought I would post it for posterity.
Thanks to Luke at Stack Overflow for this.
I will repost verbatim.
Quote:
|
I have the following html page:
|
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!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" lang="en" xml:lang="en">
<head>
<title>A title</title>
</head>
<body>
<table style="width: 700px; border: solid 1px green">
<tr>
<td style="border: solid 1px red;" colspan="2">A cell with a bunch of text. The amount of text here increases the 'x' cell.<td>
</tr>
<tr>
<td style="width: 100px; border: solid 1px purple;" >x</td>
<td style="border: solid 1px blue;">Some sample text</td>
</tr>
</table>
</body>
</html>
Quote:
|
In all browsers other than Internet Explorer (8), the cell with contents "x" has a width of 100px, and it's adjacent cell fills the rest of the table. In internet explorer 8, it's quite a bit bigger, and it's size varies depending on how much text is in the cell with colspan="2" set. Is there a fix for this bug in IE?
|
The solution that worked for me (again thanks Luke)
Quote:
|
add style="width: 100%;" to the table cells with colspan="2" also fixes the problem.
|
http://stackoverflow.com/questions/2...th-colspan-set
I'll go ahead and pre-empt the usual queries about "why are you using tables instead of CSS floats, blah blah". Preaching to the converted.
But useful to know this just the same.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals" Please login or register to view this content. Registration is FREE
|