Forum Moderators: not2easy

Message Too Old, No Replies

TABLE style not working

         

dnimrodx

7:22 pm on Feb 25, 2005 (gmt 0)

10+ Year Member



Hi,

I am in the process of developing a website and, now that I have reached the end (almost), I decided to fully make use of CSS styles.

So, I've tried defining this style:

[pre]
TABLE /* table general definitions */
{
border-spacing: 0.25em 0;
border-collapse: collapse;
}
[/pre]

... and I've taken all the following properties from within every TABLE tag:

[pre]
border="0" cellspacing="0" cellpadding="0"
[/pre]

However my rendered page under Internet Explorer 6 -- the only browser I use -- isn't displayed properly!

Is there an issue I am not aware of?

createErrorMsg

9:53 pm on Feb 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not a tables guy, so I have little experience with either of the properties you mention, however, reading the W3 Specs [w3.org] on them gives me the impression that border-spacing does not couple with border-collapse:collapse.

For one thing, the details about border-spacing are included in the section talking about border-collapse:seperate. Spacing is not mentioned at all in the collapsing borders model description. Rather that section discusses a need to define each border for different cells using the regular border properties.

But mostly I say this because of this quote about the Sperate border model ...

In this model [border-collapse:seperate], each cell has an individual border. The 'border-spacing' property specifies the distance between the borders of adjoining cells.

But in the Collapsing borders model, the borders are not seperate for each cell, and so applying spacing between them doesn't accomplish anything.

My point: try border-collapse:seperate, instead.

I decided to fully make use of CSS styles
...
Internet Explorer 6 -- the only browser I use

I think you will find that these two statements are mutually exclusive. You really cannot make full use of CSS if the only browser you use is IE. And I don't mean that you won't enjoy the benefits as a user (although that's true); I mean that as a designer you cannot hope to get a clear picture of how and why CSS works the way it does if you are using and testing it exclusively in the most hostile CSS environment ever made.

I would strongly recommend that you download and install FireFox, if only for testing/designing/css-ing purposes. Test all of your CSS in FF first, then once it's behaving there, load it into IE and make whatever hacks, tweaks or conditional changes are necessary to get it looking presentable in IE.

cEM

dnimrodx

9:43 am on Feb 26, 2005 (gmt 0)

10+ Year Member



gives me the impression that border-spacing does not couple with border-collapse:collapse.

What really annoys me is that if I introduce this style as inline, the table is rendered perfectly (no need for the cellspacing/padding and border properties to be included in the tag). But if I define the style as a generic CSS one, it doesn't work!

Why?!

I would strongly recommend that you download and install FireFox, if only for testing/designing/css-ing purposes. Test all of your CSS in FF first, then once it's behaving there, load it into IE and make whatever hacks, tweaks or conditional changes are necessary to get it looking presentable in IE.

i have been told this many many times over and I am really starting to truly believe it! Any clues on why Microsoft keeps not being up to the W3C's standards on not only CSS but also D/HTML?

Thank you very much for the insights!

- Dave

supermanjnk

3:36 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



as far as I know there really isn't a css thing that will do the exact same thing as cellpadding and cellspacing.

choster

9:10 pm on Feb 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AFAIK IE does not support border-spacing at all, although it does recognize border-collapse.

dnimrodx

9:13 am on Mar 1, 2005 (gmt 0)

10+ Year Member



In other words, I have to stick to the old tag properties...

What do you guys think?

katana_one

2:12 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Have you tried defining padding/margins/borders for your <td> or <tr> tags in CSS?

I'm not certain, but that may be what you are looking for. I have a page I'm re-designing with CSS that uses nested tables for page layout, and I had to specify padding:0 in both the <table> rule and the <td> rule to override the default cellpadding.

dnimrodx

3:57 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Yeah I have. The issue lies in the border spacing... That is what I was trying to supress.