Welcome to WebmasterWorld Guest from 54.227.231.144

Forum Moderators: open

Message Too Old, No Replies

Opera small screen and tables

   
9:59 pm on May 22, 2006 (gmt 0)

10+ Year Member



I have a simple table that looks absolutely incorrect in Opera when I switch to the small screen view. I'm guessing this is because I'm ignoring some W3C standard Firefox and IE don't enforce... Even stripped down code produces a table a vertically stacked cells, like so:

______
_th_
_th_
_th_
_td_
_td_
_td_

and this is the HTML:

<table>
<thead style="background-color:#bbbbbb;">
<tr>
<th>Year</th>
<th>Month</th>
<th>Kilobytes</th>
</tr>
</thead>
<tbody>
<tr>
<td>2006</td>
<td>MAY</td>
<td>0.15</td>
</tr>
</tbody>
</table>

Anyone know what I'm doing wrong? Thanks!

2:41 pm on May 23, 2006 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I see the same thing using your code to test. And I've tried 4 or 5 work-arounds but still get the same stacking effect. I don't see that you are doing anything "wrong", garann

It looks like the small screen mode is set up to stack table cells in every case -- assuming that every table is a layout table. There seems to be no way to discriminate "real" table data from a layout table, and the cells just get stacked up, even if side by side display space is available.

5:16 pm on May 23, 2006 (gmt 0)

10+ Year Member



That's nuts! I'm using the small screen mode because I saw the same bug on a phone. The weird thing is, the bug shows up on the latest and oldest versions of the phone I'm testing on, but the browsers (still Opera) on the versions in between display it correctly. I guess will fill out a bug report...

Thanks for the vote of confidence in my code, anyway. :)

6:41 pm on May 23, 2006 (gmt 0)

10+ Year Member



I think I found the answer: [webmonkey.wired.com]

The good news is that some SSBs won't mess too much with your CSS if you link to an explicitly defined handheld stylesheet. For instance, Opera's Symbian browser employs something they call "small-screen Rendering" (or, SSR, in their terminology). They tweak with your HTML according to their SSR rules unless you've specified a unique handheld stylesheet, whereby they trust you to know what you're doing with fixed table widths, images sizes, etc.

Here's the tag you'd want to use to point to a handheld stylesheet:

<link rel="stylesheet" type="text/css" media="handheld" href="file_name.css">

..In case anyone else runs into the same thing. Seems to be working for me!

10:47 pm on May 23, 2006 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



That's excellent -- thanks for reporting back