From: Josiah Jenkins on
I have a table which now displays (almost) as I want it to, as long as
[table frame="box"] is retained in the HTML.

How can I incorporate this into the css rather than include it in
every page where it's needed ?

ie. What's the correct declaration block ?

I've looked but can't find the info in either of my books
or on the 'net.

I've already figured out how to remove the rest of the entry
previously used in the HTML and these dimensions are
now set in the style sheet . . .
[table border="6" cellspacing="3" cellpadding="2"]
but I'm stuck on this last bit.

Any help appreciated.

I've thrown a (validated) test page up at :
http://www.ian-stewart.eu/table_test.php
--
http://www.ian-stewart.eu
From: rf on

"Josiah Jenkins" <josiah-jenkins(a)somewhere_else.invalid> wrote in message
news:k5qdh5tnra01klelrk15d8gulqn06lh8bp(a)4ax.com...
>I have a table which now displays (almost) as I want it to, as long as
> [table frame="box"] is retained in the HTML.
>
> How can I incorporate this into the css rather than include it in
> every page where it's needed ?

table {border: solid 1px black;}


From: Josiah Jenkins on
On Thu, 03 Dec 2009 10:49:36 +1100, dorayme
<doraymeRidThis(a)optusnet.com.au> wrote:

>In article <k5qdh5tnra01klelrk15d8gulqn06lh8bp(a)4ax.com>,
> Josiah Jenkins <josiah-jenkins(a)somewhere_else.invalid> wrote:
>
>> I have a table which now displays (almost) as I want it to, as long as
>> [table frame="box"] is retained in the HTML.
>>
>> How can I incorporate this into the css rather than include it in
>> every page where it's needed ?
>
>Incorporate?

Apologies if 'incorporate' means something else.

Can I put a single declaration into the css that says 'frame is to be
a box' rather than have [table frame="box"] on 4 -5 different pages ?

I'm just trying to clean up the redundant stuff in the HTML pages.

Or am I just better leaving what works ?
>>
>>test page up at :
>> http://www.ian-stewart.eu/table_test.php
>
>Why are you enclosing a table in a div?

Because I thought I had to . . .
Obviously there's a better way to do it.
>
>"table frame="box" is ... in the HTML"

Yeah, that's what I'm asking. Can I have a
declaration / command / instruction / correct word
in *one* stylesheet rather than have to repeat the
same 'instruction' on half-a-dozen HTML pages ?
--
http://www.ian-stewart.eu
From: dorayme on
In article <oa8eh51hph7r2djlglmbhqf2peqb7ialhn(a)4ax.com>,
Josiah Jenkins <josiah-jenkins(a)somewhere_else.invalid> wrote:

> On Thu, 03 Dec 2009 10:49:36 +1100, dorayme
> <doraymeRidThis(a)optusnet.com.au> wrote:
>
> >In article <k5qdh5tnra01klelrk15d8gulqn06lh8bp(a)4ax.com>,
> > Josiah Jenkins <josiah-jenkins(a)somewhere_else.invalid> wrote:
> >
> >> I have a table which now displays (almost) as I want it to, as long as
> >> [table frame="box"] is retained in the HTML.
> >>
> >> How can I incorporate this into the css rather than include it in
> >> every page where it's needed ?
> >
> >Incorporate?
>
> Apologies if 'incorporate' means something else.
>
> Can I put a single declaration into the css that says 'frame is to be
> a box' rather than have [table frame="box"] on 4 -5 different pages ?
>
> I'm just trying to clean up the redundant stuff in the HTML pages.
>
> Or am I just better leaving what works ?
> >>

Ah, I see. You want the CSS equivalent to the HTML attribute of frame
with the 'box' value. Well, there is surely a *good enough* (no not so
elaborate) approximation in something like

..someName {border: 2px grooved #339;}

Personally I like my table borders anything but ornate. Only when I
forge a Great Master and try to flog it off on the internet do I go in
for a few tricks. I suppose I could have a go to replicate your frame
but perhaps this will do you? You just class the table concerned as

<table class="someName">...

and stick the CSS in a linked stylesheet.

The other way to do this if you really want the exact way each browser
renders the HTML attribute of frame for your chosen value (remember,
different browsers might even render this a bit differently) is to use
an include.

There are a couple of different types of includes but they basically
consist of you having the table (or the table element markup opening
tag) in a file somewhere and you put in a little bit of text in the part
of the HTML pages where you want this text to appear to appear.

It is a bit boring, for example, repeating the very same HTML on every
page for a navigation set of links. Instead, one can make the list in a
separate file and just give the command to include it in the HTML pages:

<?php include ($_SERVER['DOCUMENT_ROOT'].'/includes/nav.inc'); ?>

In principle, you can do this with a snippet of text that you want to
repeat, but it becomes a bit silly if the include command is longer than
the text snippet that will be included.

An include works by the server seeing the special command and fetching
the text from the file mentioned in the command and including it in the
HTML.


> >>test page up at :
> >> http://www.ian-stewart.eu/table_test.php
> >
> >Why are you enclosing a table in a div?
>
> Because I thought I had to . . .
> Obviously there's a better way to do it.
> >

A table is a perfectly good element and is a very proud member of the
box elements. I have seen tables humiliated by having to be inside some
lesser, much less complicated and featureless and boring element like a
div *for no good reason*. They do not much like being in table cells,
they regard this as particularly humiliating - *they* are usually the
parents of such a lesser element as a cell.

Perhaps there are occasions when it is needed but it does not *have* to
be inside a div. Images or bits of text do have to be in an element
under some strict doctypes. But not a table. It can just be plonked
wherever, it can be floated, it can be positioned or just let into the
flow of the HTML doc, it can be used to substitute for complicated
lists, both unordered or ordered without loss of semantic utility, I
have even seen a table agree to talk to me when I am lonely. I like
tables. They are big friendly things ...

> >"table frame="box" is ... in the HTML"
>
> Yeah, that's what I'm asking. Can I have a
> declaration / command / instruction / correct word
> in *one* stylesheet rather than have to repeat the
> same 'instruction' on half-a-dozen HTML pages ?

--
dorayme
From: rf on

"dorayme" <doraymeRidThis(a)optusnet.com.au> wrote in message
news:doraymeRidThis-

> .someName {border: 2px grooved #339;}

Which is along the lines of what I said this morning.