Controlling table attribtutes with external CSS | |
I get the feeling this was just discussed, so sorry if this is
redundant.
I want to make my books site XHTML Basic, so it will look good on
PDA's. Not knowing what to do, I simply switched DTD's, and tried to
validate it at the W3C. It *almost* validated. The main things it
didn't like (aside from inline style declarations) were the attributes
for my <table> tag. The only attribute it accepted was "summary".
I'm simply wondering, before I go messing around with a 1500 page site
whether or not it's a good idea to specify cellpadding, cellspacing,
width, and border in CSS. (If, indeed, it's possible.)
This is for the header (the URL for Bookstacks is in my sig), which is
a table. The middle <td> has width="100%", so that it becomes a kind
of auto-stretch cell. It's real important to keep that as is.
Any suggestions would be greatly appreciated. Even, I suppose,
suggestions on how to use <div>'s instead of a <table>. :-)
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 00:15:10 +0100, David Dorward <dorward@yahoo.com>
wrote:
[color=blue]
>Put the content in a <div>, set left and width margins on it, and make it
>clear left.[/color]
Archived and practically enshrined. Thanks, buddy.
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
In article <dg7mhv0ir8pqg59t451dpv07hefg9ejopu@4ax.com>, one of infinite monkeys
at the keyboard of Ian Rastall <idrastall@earthlink.net> wrote:[color=blue]
>
> I want to make my books site XHTML Basic, so it will look good on
> PDA's. Not knowing what to do, I simply switched DTD's, and tried to
> validate it at the W3C.[/color]
[color=blue]
> (chop)[/color]
[color=blue]
> This is for the header (the URL for Bookstacks is in my sig), which is[/color]
$ lynx -dump -head http://www.bookstacks.org/
HTTP/1.1 200 OK
Date: Mon, 21 Jul 2003 00:00:52 GMT
Server: Apache/1.3.27 (Unix) FrontPage/5.0.2.2634
Connection: close
Content-Type: text/html
Stop right there!
text/html is for HTML, and (by a horrible kludge) XHTML 1.0.
Any other XHTML should NOT be served as text/html.
[color=blue]
> Any suggestions would be greatly appreciated. Even, I suppose,
> suggestions on how to use <div>'s instead of a <table>. :-)[/color]
If the table is/was for layout, then that's a good move. But don't
associate it with a move to XHTML, which is a different thing. And
don't expect changing the DOCTYPE to have any automagic effect on PDAs.
--
Nick Kew
In urgent need of paying work - see http://www.webthing.com/~nick/cv.html | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 01:05:50 +0100, nick@fenris.webthing.com (Nick
Kew) wrote:
[color=blue]
>text/html is for HTML, and (by a horrible kludge) XHTML 1.0.
>Any other XHTML should NOT be served as text/html.[/color]
Thanks, man. I'll look into it. I assume it's a <meta> tag I need.
[color=blue]
>If the table is/was for layout, then that's a good move. But don't
>associate it with a move to XHTML, which is a different thing. And
>don't expect changing the DOCTYPE to have any automagic effect on PDAs.[/color]
<sigh> That wasn't what I said. I simply used the validator to tell me
what I needed to change. Turns out the changes were simple. I only
have to fix one small oversight, upload the whole beast, and I'll be
done. Except now you've pointed out a big problem with the MIME type,
and I'll have to fix that.
Thanks for the heads up.
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
Ian Rastall <idrastall@earthlink.net> writes:[color=blue]
> On Mon, 21 Jul 2003 01:05:50 +0100, nick@fenris.webthing.com (Nick
> Kew) wrote:[color=green]
> >text/html is for HTML, and (by a horrible kludge) XHTML 1.0.
> >Any other XHTML should NOT be served as text/html.[/color]
>
> Thanks, man. I'll look into it. I assume it's a <meta> tag I need.[/color]
Server configuration change. If you're the web server admin, you can
do this directly through the configuration files. Otherwise (assuming
an Apache server) you can probably do it with a .htaccess file.
Otherwise ask the server admin nicely.
--
Chris | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 11:57:21 +0100, Jim Dabell
<jim-usenet@jimdabell.com> wrote:
[color=blue]
>Bear in mind Internet Explorer and lots of older user-agents can't
>understand application/xhtml+xml (can the Googlebot? What about other
>SEs?).[/color]
Ah, that's a shame. I've already made the request to my hosting
company. <sigh> What would you suggest? Back to text/html? There
doesn't seem to be a text/xhtml (or is there?)
Perhaps text/xml?
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
Ian Rastall wrote:
[color=blue]
> On Mon, 21 Jul 2003 11:57:21 +0100, Jim Dabell
> <jim-usenet@jimdabell.com> wrote:
>[color=green]
>>Bear in mind Internet Explorer and lots of older user-agents can't
>>understand application/xhtml+xml (can the Googlebot? What about other
>>SEs?).[/color]
>
> Ah, that's a shame. I've already made the request to my hosting
> company. <sigh> What would you suggest? Back to text/html? There
> doesn't seem to be a text/xhtml (or is there?)[/color]
If you want a website that's reliable in Internet Explorer and older UAs, as
far as I am aware, the only option is text/html. Whilst the text/html
definition [1] clearly states that XHTML 1.0 may be transmitted as
text/html (as long as you follow Appendix C), many people consider that to
be a poor choice as well [2].
In practical terms, you may well be able to get away with describing XHTML
Basic as text/html, but be quite clear that this is against spec. and so
will not gain you much sympathy if things break :)
One possibility is to serve different documents to different user-agents,
depending on what they say they can handle. This is called content
negotiation, in case you want to look into it. You're probably better off
simply going to XHTML 1.0 Strict + Appendix C or HTML 4.01 Strict and
sticking with text/html for everyone though.
[1] RFC 2854, <URL:http://www.ietf.org/rfc/rfc2854.txt>.
[2] <URL:http://www.hixie.ch/advocacy/xhtml> or archives of ciwah, among
other places.
--
Jim Dabell | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 12:42:11 +0100, Jim Dabell
<jim-usenet@jimdabell.com> wrote:
[color=blue]
>One possibility is to serve different documents to different user-agents,
>depending on what they say they can handle. This is called content
>negotiation, in case you want to look into it. You're probably better off
>simply going to XHTML 1.0 Strict + Appendix C or HTML 4.01 Strict and
>sticking with text/html for everyone though.[/color]
I will look into it. Right now I'm waiting to see what happens when my
host changes their Apache config file. If my browsers break, then I'll
have to write back to them with my hat in my hand, begging to switch
back. (Hey, I pay them well.)
Not to be a pest, but when I was looking into the content-types (at
the W3C site ... sorry, no URL) it did say that text/xml was a generic
way of doing what I need to do, and was preferable to text/html. What
kind of browsers are we looking at that wouldn't understand text/xml?
4th generation and back?
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
Ian Rastall wrote:
[color=blue]
> What kind of browsers are we looking at that wouldn't understand text/xml?
> 4th generation and back?[/color]
Yes, pretty much. I believe Internet Explorer won't apply any special HTML
rules to an XHTML document served in this way, such as creating links for
a[href] elements. I'm sure others will jump in if I'm wrong though. No
idea about search engines and other types of UA.
Don't take the W3C too seriously when they state preferred ways of doing
things. They don't make any guarantee that such things are _feasible_,
only that they are the better technical approach, all other things being
equal (they rarely are).
--
Jim Dabell | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 13:19:13 +0100, Jim Dabell
<jim-usenet@jimdabell.com> wrote:
[color=blue]
>Don't take the W3C too seriously when they state preferred ways of doing
>things. They don't make any guarantee that such things are _feasible_,
>only that they are the better technical approach, all other things being
>equal (they rarely are).[/color]
All right. I don't understand much of what I read on their site, but I
always come away feeling that they're slightly super-human. :-)
Ian
-- http://www.aspipes.org/ http://www.bookstacks.org/ | | | | re: Controlling table attribtutes with external CSS
On Mon, 21 Jul 2003 22:48:41 +0930, Tim <admin@sheerhell.lan> wrote:
[color=blue]
>On Mon, 21 Jul 2003 11:57:21 +0100,
>Jim Dabell <jim-usenet@jimdabell.com> wrote:
>[color=green]
>> Bear in mind Internet Explorer and lots of older user-agents can't
>> understand application/xhtml+xml[/color]
>
>I seem to recall that there was some patch to get MSIE to parse, rather
>than just download XHTML served properly, though I can't find the
>reference again (it was somewhere on the Microsoft site). Does anybody
>know the answer?[/color]
I've never seen a patch, but it's changeable through the file-types
config options, no need to even hack the registry.
I would recommend though that you instead explicitly change IE's
accept headers to reject XHTML, as having tag-soup rendering for xhtml
docs is getting even further from the point surely.
[color=blue]
>Though I have to admit, it is amusing to serve pages that MSIE just
>cannot use. ;-)[/color]
It correctly hands them off to Opera for me, has no problems at all,
of course if a server is stupid enough to send them to me, when it
knows I don't accept them, then it makes the author look dumb *, not
IE.
Jim.
* and HTTP 1.1 for allowing it...
--
comp.lang.javascript FAQ - http://jibbering.com/faq/ |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,471 network members.
|