473,503 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS: formatting tables for screen and handheld

Hi,
I want to have a table for screen layout like this:

One Two Three Four
One Two Three Four

When i access the page via handheld, i want that table to look like
this:

One Two
Three Four

One Two
Three Four

How can i solve this in HTML / CSS?
Feb 20 '08 #1
1 2467
noodyn wrote:
Hi,
I want to have a table for screen layout like this:

One Two Three Four
One Two Three Four

When i access the page via handheld, i want that table to look like
this:

One Two
Three Four

One Two
Three Four

How can i solve this in HTML / CSS?
Theoretically, I think this should do it:

@media handheld {
table.flexTable { display: block; overflow: hidden; }
table.flexTable tr { display: block; clear: left; }
table.flexTable td { display: block; float: left; }
}

IE on Windows Mobile 5, however, only applies @media handheld to the
first property within its scope, so for testing I had to wrap each rule
in a separate @media handheld rule. And then it wrapped each cell to the
next line. So then I changed block to inline-block for the td rule, but
then no wrapping occurred at all. So I give up.
Feb 20 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1804
by: Brian | last post by:
Warning: mild rant to follow: I was quite surprised and annoyed to learn that Mozilla 1.x loads stylesheets for media other than screen (or all), and treats them as if they were alternate...
2
2698
by: Philipp Lenssen | last post by:
I'm looking for samples which make use of the XHTML Basic doctype and handheld CSS. Anybody know some good URLs which use plain CSS to layout the page (as opposed to many graphics)? I want to...
40
2660
by: Mason A. Clark | last post by:
CSS Experts: OK, I'm a stupid newby. Now, here's the question: Can CSS replace slightly complicated Tables and work in three browsers (e.g. MSIE 6.0, Net 7.1, Op 7.03) ? After countless...
4
3969
by: Gary Finnigan | last post by:
Hi I am having difficulty in placing a footer at the bottom of my page. Can anyone suggest what I'm doing wrong? www.clickatdepaul.org Regards Gary -- Regards
1
2929
by: Garmt de Vries | last post by:
For a long time, I've used CSS to style my webpages, but only for media "screen" and "print". Now I've started looking into styling them for other media like "projection" and "handheld". I'd be...
26
2803
by: Thomas Mlynarczyk | last post by:
Hi, Could some kind person using Mac or Linux (or others) please take a look at http://www.mlynarczyk-webdesign.de/tmp/menu/menu.html and tell me if the page renders as it should (screenshot...
9
3379
by: Les Juby | last post by:
I understand that there are several ways to effectively control the browser delivery of HTML to make the most effective use of the different screen resolutions today. (And in the foreseeable...
8
17716
by: Steve Macleod | last post by:
Hi, I was wondering if anyone had a solution for printing HTML elements (especially style elements). I do not wish to make any changes to the page, other than in the <css media="print"block. I can...
2
1394
by: fjohnson | last post by:
Hello, I have a CSS Horizontal dropdown menu and the drop down menu is pushed to the right instead of directly underneath the heading. I am completely new to CSS and I do not yet know exactly what...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.