473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Render <td> as display:block; ?

Background:
I have a bunch of (yet unwritten) code for a JSP tag library to
generate "tables" of data.The same tag library will be re-used to
generate a great many "complex data view" pages. In nearly all
contexts for this app, the appropriate HTML to generate is simple
<table... <td ... </tablemarkup, with CSS default rendering
applied to it. A database recordset maps quite simply column to
column, with the recordset column names used to caption the table
columns via <th>

I will be building an "entire table" tag for simple rapid prototyping,
but my intention is generally to require one tag to be embedded in the
JSP for each output "unit", typically a <td>...</td>. One of the
requirements is to make page and view design easily accessible to
coders who grok SQL and HTML / simple JSP tags, but who won't then
need to go near the Java that back-ends all this.

For a few of these columns (address etc.) it's appropriate to merge
these recordset columns into a single HTML unit (i.e. one <td>) and
separate them with <br>. Each tag will be regarded as generating "a
unit of content" in some abstract "table of data", but I don't want
the coders to think of them in terms of a "<tdgenerator tag".

In a very few cases (some of the pages) there could be very little
data involved here, even just a single row returned. I'd like to
abandon the <table>-like presentation here and use a handful of simple
<div>s or blocks, floated alongside each other.

My question is this:
Assuming I have to build the <tableand <tdgenerator, then do I
also need to build tag behaviour that will generate <divmarkup as
well? Or can I simply apply CSS of td { display: block; } and
switch it purely at the CSS presentation level, using the same
HTML?

I know I can do this in principle, but what's it like for widespread
browser support out in the real world?

Platform is an intranet app that's heavily contractually tied into
just running on IE7. Naturally I want something more than this, every
credible desktop browser of recent vintage. Non-desktop or small-
screen devices aren't too significant though.
Thanks for any thoughts on this approach, or on the CSS portability.
(If I get time for a HTML prototype today, I'll put it on-line and
post a URL)
Jan 16 '08 #1
0 2704

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

Similar topics

8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
1
by: Tony Farrell | last post by:
Hi everyone - I am trying to accomplish a task that i thought would be easy - and at this point - i'm starting to wonder... I have a table setup, one column, ten rows All the cells start...
14
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it...
1
by: Zambien | last post by:
Well, it's been about a week and I still can't figure this problem out. I've cut the html down to it's bare minimum and when I click on the select buttons in NS, the table gets all skewed. I've...
3
by: Yeah | last post by:
Through CSS, is there a way to change the color of a table cell on a hover? By the way, the cell also contains a link - the text link and table cell mouseover should both be clickable to the link's...
2
by: taras.di | last post by:
Hi everyone, I know that there's been a bit of discussion involving placing <div>s inside table cells, but I've read all of the posts and couldn't find anything that solved my problem. I've...
4
by: John | last post by:
I am attempting to make a table data row editable once clicked on but I am not sure how to show the <tdwith two different states. I've got it to the point where the <tdis hidden then appears within...
4
by: plumba | last post by:
Let me explain.... I have a form (most of which you guys have helped me with!!). The initial problem I was having is that it was holding the data in the fields after submit, I resolved this by...
3
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/td-position.html In Internet Explorer, the "hello, world!" text is on top on the red box is on the bottom. In Firefox, the "hello, world!" text is on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.