473,387 Members | 1,859 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,387 software developers and data experts.

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/
Jul 20 '05 #1
10 3747
On Mon, 21 Jul 2003 00:15:10 +0100, David Dorward <do*****@yahoo.com>
wrote:
Put the content in a <div>, set left and width margins on it, and make it
clear left.


Archived and practically enshrined. Thanks, buddy.

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
Jul 20 '05 #2
In article <dg********************************@4ax.com>, one of infinite monkeys
at the keyboard of Ian Rastall <id*******@earthlink.net> wrote:

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. (chop) This is for the header (the URL for Bookstacks is in my sig), which is
$ 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.
Any suggestions would be greatly appreciated. Even, I suppose,
suggestions on how to use <div>'s instead of a <table>. :-)


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
Jul 20 '05 #3
On Mon, 21 Jul 2003 01:05:50 +0100, ni**@fenris.webthing.com (Nick
Kew) wrote:
text/html is for HTML, and (by a horrible kludge) XHTML 1.0.
Any other XHTML should NOT be served as text/html.
Thanks, man. I'll look into it. I assume it's a <meta> tag I need.
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.


<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/
Jul 20 '05 #4
Ian Rastall <id*******@earthlink.net> writes:
On Mon, 21 Jul 2003 01:05:50 +0100, ni**@fenris.webthing.com (Nick
Kew) wrote:
text/html is for HTML, and (by a horrible kludge) XHTML 1.0.
Any other XHTML should NOT be served as text/html.


Thanks, man. I'll look into it. I assume it's a <meta> tag I need.


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
Jul 20 '05 #5
On Mon, 21 Jul 2003 11:57:21 +0100, Jim Dabell
<ji********@jimdabell.com> wrote:
Bear in mind Internet Explorer and lots of older user-agents can't
understand application/xhtml+xml (can the Googlebot? What about other
SEs?).


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/
Jul 20 '05 #6
Ian Rastall wrote:
On Mon, 21 Jul 2003 11:57:21 +0100, Jim Dabell
<ji********@jimdabell.com> wrote:
Bear in mind Internet Explorer and lots of older user-agents can't
understand application/xhtml+xml (can the Googlebot? What about other
SEs?).


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?)


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

Jul 20 '05 #7
On Mon, 21 Jul 2003 12:42:11 +0100, Jim Dabell
<ji********@jimdabell.com> wrote:
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.


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/
Jul 20 '05 #8
Ian Rastall wrote:
What kind of browsers are we looking at that wouldn't understand text/xml?
4th generation and back?


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

Jul 20 '05 #9
On Mon, 21 Jul 2003 13:19:13 +0100, Jim Dabell
<ji********@jimdabell.com> wrote:
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).


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/
Jul 20 '05 #10
On Mon, 21 Jul 2003 22:48:41 +0930, Tim <ad***@sheerhell.lan> wrote:
On Mon, 21 Jul 2003 11:57:21 +0100,
Jim Dabell <ji********@jimdabell.com> wrote:
Bear in mind Internet Explorer and lots of older user-agents can't
understand application/xhtml+xml
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?


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.
Though I have to admit, it is amusing to serve pages that MSIE just
cannot use. ;-)


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/

Jul 20 '05 #11

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

Similar topics

4
by: Erohsik | last post by:
I am using external tables to load data from the data file. But the log files are getting created in the datafile's directory (because of CREATE OR REPLACE DIRECTORY ...) But I want those log...
3
by: leo | last post by:
Hello Guys I have this problem in controlling a text in a Text Area. How can I do that, for example the field size is 200, when it reaches 50 it automatically goes to the next line. Because im...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: Kevin Burton | last post by:
I searched some of the documentation and this description of my problem came closest: The following original schema element definitions contain minOccurs or maxOccurs attributes: <xs:element...
1
saranjegan
by: saranjegan | last post by:
hello, am in need to access a application when i press an external keypad (which i had connected to the serial port of the system and am recieving a value at one press of the key,i can open...
4
by: Joergen Bech | last post by:
Just out of curiosity: What is your favorite method of making sure that anything that happens on a form, only happens in response to a single, external event? Take the example below. I have made...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
0
by: Alistair George | last post by:
Hello all. I have been trying to find an api that works with external (not card) devices so that the application works with all types of product, eg all-in-one wifi/adsl/router such as Dlink...
1
by: Cainnech | last post by:
Hello all, I have a big challenge ahead of me but I'm gonna need a lot of help from experts on this one. I have to create a system that can receive input from external devices. So when users...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.