Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > tables and CSS

Reply
Thread Tools

tables and CSS

 
 
Jure Erznoznik
Guest
Posts: n/a
 
      04-22-2005
Let's say, we have a table:

<table>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
....
</tbody>
</table>

I want to have a specific style associated with each of the columns which I
currently accomplish through <td class="colxx">.
Is it possible to achieve the same result without specifying class for each
and every <td>?
<colgroup/> doesn't seem to work???
Using XHTML 1.0 strict (IE in quirks mode).

Thanks,
Jure



 
Reply With Quote
 
 
 
 
Sid Ismail
Guest
Posts: n/a
 
      04-22-2005
On Fri, 22 Apr 2005 10:33:43 +0200, "Jure Erznoznik" <(E-Mail Removed)>
wrote:

: Let's say, we have a table:
:
: <table>
: <tbody>
: <tr>
: <td></td>
: <td></td>
: <td></td>
: </tr>
: ...
: </tbody>
: </table>
:
: I want to have a specific style associated with each of the columns which I
: currently accomplish through <td class="colxx">.
: Is it possible to achieve the same result without specifying class for each
: and every <td>?


In you head
<style type="text/css">
<!--
td {font-size:80%; border:1px dotted navy;}
-->
</style>

Sid


 
Reply With Quote
 
 
 
 
Jure Erznoznik
Guest
Posts: n/a
 
      04-22-2005
???
I don't see how this could help me?!? You are only setting font size and
border for your cells.

My table is on the 3rd level of nesting and has to be 100% width because of
another table following right after this one and this table is some sort of
header for the following one).

Thanks anyway,
Jure

"Sid Ismail" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 22 Apr 2005 10:33:43 +0200, "Jure Erznoznik" <(E-Mail Removed)>
> wrote:
>
> : Let's say, we have a table:
> :
> : <table>
> : <tbody>
> : <tr>
> : <td></td>
> : <td></td>
> : <td></td>
> : </tr>
> : ...
> : </tbody>
> : </table>
> :
> : I want to have a specific style associated with each of the columns
> which I
> : currently accomplish through <td class="colxx">.
> : Is it possible to achieve the same result without specifying class for
> each
> : and every <td>?
>
>
> In you head
> <style type="text/css">
> <!--
> td {font-size:80%; border:1px dotted navy;}
> -->
> </style>
>
> Sid
>
>



 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      04-22-2005
Jure Erznoznik wrote:

> Let's say, we have a table:
>
> <table>
> <tbody>
> <tr>
> <td></td>
> <td></td>
> <td></td>
> </tr>
> ...
> </tbody>
> </table>
>
> I want to have a specific style associated with each of
> the columns which I currently accomplish through <td
> class="colxx">. Is it possible to achieve the same
> result without specifying class for each and every <td>?
> <colgroup/> doesn't seem to work???
> Using XHTML 1.0 strict (IE in quirks mode).


http://www.mbstevens.com/test/column.html
.....has a few ideas.

IE in quirks mode AND an XHTML-strict doctype??
________

http://msdn.microsoft.com/library/de...hancements.asp
__________
Not sure what you're getting at about quirks mode here,
but I'd drop it.

 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      04-22-2005
mbstevens wrote:
> Jure Erznoznik wrote:
>
> > Using XHTML 1.0 strict (IE in quirks mode).

>
> IE in quirks mode AND an XHTML-strict doctype??


If there's a XML declaration (or anything except whitespace) before the
doctype then IE goes into quirks mode regardless of the actual doctype.

Stupid but true.

Steve

 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      04-22-2005
Steve Pugh wrote:
>If there's a XML declaration
>(or anything except whitespace) before the
> doctype then IE goes into quirks
> mode regardless of the actual doctype.


> Stupid but true.


Oh, yeah, you're right, I remember now.
I always use xml declarations in my normal pages,
but my particular style never uses
for things that seems to break under IE when I test.
I'll have to boot into XP and see if my example
page still works.






 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      04-22-2005
mbstevens wrote:

> Steve Pugh wrote:
>>If there's a XML declaration
>>(or anything except whitespace) before the
>> doctype then IE goes into quirks
>> mode regardless of the actual doctype.

>
>> Stupid but true.

>
> Oh, yeah, you're right, I remember now.
> I always use xml declarations in my normal pages,
> but my particular style never uses
> for things that seems to break under IE when I test.
> I'll have to boot into XP and see if my example
> page still works.


Seems to still work, at least in IE6 under XP.

(Drifting OT; stupid XP held me up by trying
to install hardware, warning me of this and that,
and generally irritating the bloody hell out of me
by pitching a M$ approved firewall before I could have a
look. They don't call them the Evil Empire for nothing.)

 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-24-2005
Jure Erznoznik wrote:

> My table is on the 3rd level of nesting and has to be 100% width because of
> another table following right after this one and this table is some sort of
> header for the following one).


That doesn't sound much like tabular data to me.

In answer to your original question, applying styles to COL and COLGROUP
elements may not always give the results you expect. You can really only
assign vertical borders and text alignment that way.

It has to do with CSS inheritance -- TD elements can only inherit from
their *real* parents -- the TR elements -- and not from the COL elements
because they're not "inside" the COL elements.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get database metadata information (i.e. existing tables and columns in tables) Chris Brat Python 5 08-22-2006 05:25 PM
Tables within tables Otuatail HTML 7 08-02-2004 04:42 AM
Tables and CSS Mark Rae ASP .Net 4 07-17-2004 09:08 AM
Text after 2 tables actually appears between 2 tables ! Peter Bassett HTML 3 08-15-2003 06:46 PM
Tables and CSS Christopher R HTML 1 06-26-2003 07:35 AM



Advertisments