HighDots Forums  

Re: Positioning table elements with CSS <div> tags

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Positioning table elements with CSS <div> tags in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-01-2003 , 09:08 PM






*Herbman* <hramos67 (AT) yahoo (DOT) com>:
Quote:
The table itself is positioned with <div> tags.
How do you do that? Usually one would use CSS for that.

Quote:
when I use <div> tags to position the rows within the table nothing happens.
'Div' isn't allowed inside 'table' nor 'tbody', but 'tr' is. OTOH you can
position /any/ box with CSS, e.g. one generated by an 'tr' element. Your
HTML resp. CSS teachers / books / tutorials should have told you that.

Quote:
In the following example, I want to position two table rows relative
to the table itself.
Don't margin or padding work better?

Quote:
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px; font-weight: bold;
font: bold 1em sans-serif;

Quote:
style type="text/css"
Why do you use a style element for each ruleset? The 'media' attribute is
useful, but not required.

Quote:
div style="position: absolute; left: 74px; top: 58px; width: 492px; height: 71px;"
Better use an ID instead of the 'style' attribute; and on the 'table', not
an extra 'div'.

Quote:
table width="469" cellpadding="0" cellspacing="1" class="tableDefault"
Mixing presentational HTML attributes with CSS is hazardous.
These here translate to

table.tableDefault {width: 449px; border-spacing: 1px}
table.tableDefault td {padding: 0}.

--
Useless Fact #5:
'Dreamt' is the only English word that ends in the letters 'mt'.
'I am.' is the shortest complete sentence in the English language.
The longest one-syllable word in the English language is 'screeched.'


Reply With Quote
  #2  
Old   
David Graham
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 02:33 AM







"Christoph Paeper" <crissov2003Q4 (AT) gmx (DOT) net> wrote

Quote:
*Herbman* <hramos67 (AT) yahoo (DOT) com>:

The table itself is positioned with <div> tags.

How do you do that? Usually one would use CSS for that.

when I use <div> tags to position the rows within the table nothing
happens.

'Div' isn't allowed inside 'table' nor 'tbody',is 'screeched.'
What is wrong with tbody being in a table? Are you sure about that?
If your correct then I'd better not be using thead and tfoot as well!
Can you clarify please
David




Reply With Quote
  #3  
Old   
Andrew Thompson
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 04:54 AM



"David Graham" <david.graham18 (AT) ntlworld (DOT) com> wrote

Quote:
"Christoph Paeper" <crissov2003Q4 (AT) gmx (DOT) net> wrote in message
news:bo1sf8$erh$1 (AT) ariadne (DOT) rz.tu-clausthal.de...
*Herbman* <hramos67 (AT) yahoo (DOT) com>:

'Div' isn't allowed inside 'table' nor 'tbody',....

What is wrong with tbody being in a table?
I read that as..
'Div' isn't allowed inside 'table' and
'div' isn't allowed inside 'tbody'..

--
Andrew Thompson
http://www.AThompson.info/
http://www.PhySci.org/
http://www.1point1C.org/




Reply With Quote
  #4  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 05:02 AM



In article David Graham wrote:

Quote:
'Div' isn't allowed inside ('table' nor 'tbody'),is 'screeched.'
Added parenthesis to group words. Notice that there is no "is" between
"nor" and tbody.

Quote:
What is wrong with tbody being in a table? Are you sure about that?
Can you clarify please
David

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.



Reply With Quote
  #5  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 05:06 AM



On Sun, 2 Nov 2003, Andrew Thompson wrote:

Quote:
"David Graham" <david.graham18 (AT) ntlworld (DOT) com> wrote in message

"Christoph Paeper" <crissov2003Q4 (AT) gmx (DOT) net> wrote in message

*Herbman* <hramos67 (AT) yahoo (DOT) com>:
[nothing that you quoted]

Quote:
'Div' isn't allowed inside 'table' nor 'tbody',....

What is wrong with tbody being in a table?

I read that as..
'Div' isn't allowed inside 'table' and
'div' isn't allowed inside 'tbody'..
Indeed. More accurately, it "isn't allowed as the immediate
descendent of ...". Wrapped in a table cell, which in turn is wrapped
in a table row, div would be fine.



Reply With Quote
  #6  
Old   
Kris
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 06:24 AM



In article <Pine.LNX.4.53.0311021103310.14438 (AT) ppepc56 (DOT) ph.gla.ac.uk>,
"Alan J. Flavell" <flavell (AT) ph (DOT) gla.ac.uk> wrote:

Quote:
On Sun, 2 Nov 2003, Andrew Thompson wrote:

"David Graham" <david.graham18 (AT) ntlworld (DOT) com> wrote in message

"Christoph Paeper" <crissov2003Q4 (AT) gmx (DOT) net> wrote in message

*Herbman* <hramos67 (AT) yahoo (DOT) com>:
[nothing that you quoted]

'Div' isn't allowed inside 'table' nor 'tbody',....

What is wrong with tbody being in a table?

I read that as..
'Div' isn't allowed inside 'table' and
'div' isn't allowed inside 'tbody'..

Indeed. More accurately, it "isn't allowed as the immediate
descendent of ...". Wrapped in a table cell, which in turn is wrapped
in a table row, div would be fine.
"The DIV element in a table is only allowed inside a table cell (TD ot
TH).", that would sum it all up.

--
Kris
kristiaan (AT) xs4all (DOT) netherlands (nl)


Reply With Quote
  #7  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Positioning table elements with CSS <div> tags - 11-02-2003 , 08:33 AM



*Andrew Thompson* <andrew64 (AT) bigNOSPAMpond (DOT) com>:
Quote:
"David Graham" <david.graham18 (AT) ntlworld (DOT) com> wrote in message
"Christoph Paeper" <crissov2003Q4 (AT) gmx (DOT) net> wrote in message

'Div' isn't allowed inside 'table' nor 'tbody',....

What is wrong with tbody being in a table?

I read that as..
'Div' isn't allowed inside 'table' and
'div' isn't allowed inside 'tbody'..
That's how the sentence was meant. The intention to add 'tbody' to the
statement was, that the element is implied in HTML4 (but not in XHTML), i.e.

<table><tr><td>foo</table>

is equal to

<table><tbody><tr><td>foo</td></tr></table>

-- therefore the selector "table>tr" will never match anything in an HTML4
document.

<table><div><tr><td>foo</td></tr></div></table>

could be either

<table><tbody><div><tr><td>foo</td></tr></div></tbody></table>

or

<table><div><tbody><tr><td>foo</td></tr></tbody></div></table>

if it was valid, which it is not.

--
My god lives -- sorry for yours!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.