By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,622 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,622 IT Pros & Developers. It's quick & easy.

Is there an XHTML replacement for using tables?

P: n/a
I am in the process of converting my site to using XHTML and CSS. A
lot of my sites include tables of data, which are highlighted using
javascript rollovers.

I have converted my a lot of my single tabled content into unordered
lists and then used something like

..html
<ul class="aaaa"><li>blah</li></ul>

..css
aaa a:hover background-color:#FFAABB

to achieve the effect.

However, I can't do this with multi columned tables. Is there a way in
XHTML or unordered lists to represent these tables? ( other than using
tables themselves :-) ).
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
be********@morpheme.co.uk (Ben Jessel) wrote:
I am in the process of converting my site to using XHTML and CSS.
I wonder why. There's probably no benefit from using XHTML, but quite
some extra cost.
A
lot of my sites include tables of data, which are highlighted using
javascript rollovers.
I wonder why. A URL might have enlightened me.
I have converted my a lot of my single tabled content into
unordered lists
Why? If it was a table of data, why did you change it to list. Or did
you mean that it was a single-row or single-column table? Why, in the
first place? So many questions...
and then used something like

.html
<ul class="aaaa"><li>blah</li></ul>

.css
aaa a:hover background-color:#FFAABB

to achieve the effect.
This raises even more questions. The class names are odd, and so is the
single-item list. Besides, the purported CSS code is ignored by
conforming browsers, due to syntax errors, so you have probably tested
it with a broken one, or did not copy & paste the code correctly.
Posting the URL would have saved everyone's time, and mine too.
However, I can't do this with multi columned tables.
I can't see what "this" is.
Is there a way
in XHTML or unordered lists to represent these tables? ( other than
using tables themselves :-) ).


If you have tabular data, why wouldn't you use a table? If you don't
have tabular data, what _have_ you got?

Regarding XHTML, XHTML 1.0 is a syntactically restricted version of
HTML 4.01, and XHTML 1.1 means further restrictions. So don't expect to
find in XHTML anything that isn't in HTML 4.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

P: n/a
In article <25**************************@posting.google.com >,
be********@morpheme.co.uk (Ben Jessel) wrote:
I have converted my a lot of my single tabled content into unordered
lists and then used something like
[CSS skipped]
However, I can't do this with multi columned tables.


You misinterpreted the advice "Don't use tables for layout". It means,
don't use tables for the looks of the site. Continue using tables for
data that is of tabular nature. The single columned tables will do fine
as lists (if they really _are_ lists to your judgement), but keep the
multicolumned datatables.

--
Kris
kr*******@xs4all.netherlands (nl)
Jul 20 '05 #3

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message news:<Xn*****************************@193.229.0.31 >...
be********@morpheme.co.uk (Ben Jessel) wrote:
I am in the process of converting my site to using XHTML and CSS.
I wonder why. There's probably no benefit from using XHTML, but quite
some extra cost.


[ Its more of a learning exercise than anything else..... ]
Its also to reduce some of the complexity in the code of embedded tables, within tables, within tables.
A
lot of my sites include tables of data, which are highlighted using
javascript rollovers.
I wonder why. A URL might have enlightened me.


[ No can do - its on my local machine only. Not deployed yet. Have no server yet.... ]
I have converted my a lot of my single tabled content into
unordered lists


Why? If it was a table of data, why did you change it to list. Or did
you mean that it was a single-row or single-column table? Why, in the
first place? So many questions...


[ The single column stuff are navigation menus. Things where tables are overkill ]
and then used something like

.html
<ul class="aaaa"><li>blah</li></ul>

.css
aaa a:hover background-color:#FFAABB

to achieve the effect.


This raises even more questions. The class names are odd, and so is the
single-item list. Besides, the purported CSS code is ignored by
conforming browsers, due to syntax errors, so you have probably tested
it with a broken one, or did not copy & paste the code correctly.
Posting the URL would have saved everyone's time, and mine too.


[ Its a quick / rough example to illustrate that I am using cascading style sheets to achieve rollover functionality with lists which are customized with css markups, not a functionally correct example, just enough to give a flavor ]
However, I can't do this with multi columned tables.


[ To re-phrase - I cannot achieve structured multi-column layout purely using cascading style sheets and XHTML without using <table>]
I can't see what "this" is.
Is there a way
in XHTML or unordered lists to represent these tables? ( other than
using tables themselves :-) ).
If you have tabular data, why wouldn't you use a table? If you don't
have tabular data, what _have_ you got?


[ Yes it would go in a table, but being new to XHTML, and given that so many developers are throwing out their old HTML layout in favor of functionality in XHTML, I was wondering whether there was a way that I could achieve tabular layout using XHTML.] Regarding XHTML, XHTML 1.0 is a syntactically restricted version of
HTML 4.01, and XHTML 1.1 means further restrictions. So don't expect to
find in XHTML anything that isn't in HTML 4.

[ Thanks, thats useful advice. What browser's are / are not HTML
compatible? What % of users use non-HTML compatible browsers? ]
Thanks
Ben
Jul 20 '05 #4

P: n/a
Ben Jessel wrote:
Regarding XHTML, XHTML 1.0 is a syntactically restricted version of
HTML 4.01, and XHTML 1.1 means further restrictions. So don't expect to
find in XHTML anything that isn't in HTML 4.
[ Thanks, thats useful advice. What browser's are / are not HTML
compatible?
Almost all of them.
What % of users use non-HTML compatible browsers? ]


Most. Certainly more than 80%.

--
Bertilo Wennergren <be******@gmx.net> <http://www.bertilow.com>
Jul 20 '05 #5

P: n/a
Ben Jessel wrote:
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:<Xn*****************************@193.229.0.31 >...
Regarding XHTML, XHTML 1.0 is a syntactically restricted version
of HTML 4.01, and XHTML 1.1 means further restrictions. So don't
expect to find in XHTML anything that isn't in HTML 4.


Thanks, thats useful advice. What browser's are / are not HTML
compatible? What % of users use non-HTML compatible browsers?


Don't mix up xhtml and html. It'll just confuse the matter. MSIE/Win
cannot handle xhtml when it is served as application xhtml/xml, iirc.
So you have to declare it as text/html. And there are compatibility
issues with the syntax of xhtml.

MSIE/Win can handle html, which you serve as text/html. There are no
compatibility issues with MSIE and xhtml. Lynx, Mozilla, Netscape,
Opera, and loads of others handle html just fine. Unless there's some
reason that you must use xhtml, stick with html 4.01/strict.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.