Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

absolutely positioned table cells



9:33 am on Jul 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I'm having an issue with Opera 9 and my attempts to hide table cells. Given the following short test case, does anyone know of a fix? Firefox, IE and Safari are doing what I'd expect: the second column of cells is effectively hidden.

<!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" lang="en" xml:lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
table { border: 1px solid red; width: 300px; }
thead { display: none; }
tr.selected { background-color: #eee; }
td { border: 1px solid blue; }
td.data { position: absolute; left: -9999px; }
<td>Row 1</td>
<td class="data">Data to be hidden</td>
<tr class="selected">
<td>Row 2</td>
<td class="data">Data to be hidden</td>
<td>Row 3</td>
<td class="data">Data to be hidden</td>
<td>Row 4</td>
<td class="data">Data to be hidden</td>

[edited by: Robin_reala at 9:36 am (utc) on July 18, 2006]


9:17 am on Jul 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

An answer came up on the Opera forums which partially fixes this - make <td>s display:block;. Unfortunately this stops border collapsing...

Featured Threads

Hot Threads This Week

Hot Threads This Month