469,312 Members | 2,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

CSS equivalents for attributes

There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff
Jul 20 '05 #1
37 3127
Jeff Thies wrote:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff


<table style="border:1px #FFFFFF; padding:3px; margin:0px;">

<div syle="text-align:center"><img src="" alt="" /></div>
--
x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
Jul 20 '05 #3
SpaceGirl wrote:
Jeff Thies wrote:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff

<table style="border:1px #FFFFFF; padding:3px; margin:0px;">

<div syle="text-align:center"><img src="" alt="" /></div>


oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">

--
x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
Jul 20 '05 #4
Jeff Thies <je**@spamalanadingong.com> writes:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?


Yes. border, padding, border-spacing and vertical-align.
http://www.w3.org/TR/CSS2/

--
Chris
Jul 20 '05 #5
SpaceGirl <NO*************@subhuman.net> writes:
Jeff Thies wrote:
There's a number of elements that I set attributes for:
<table border="1" cellpadding="3" cellspacing="0">..
<img align="middle">
Are there CSS equivalents for any of these?
Jeff
<table style="border:1px #FFFFFF; padding:3px; margin:0px;">


Not quite - cellspacing is duplicated in CSS by border-spacing, not
margin (and even then only if border-collapse: separate is set).

And the padding should be on the tds, not on the table itself, to
duplicate the old cellpadding effect.
<div syle="text-align:center"><img src="" alt="" /></div>


And 'align="middle"' on an image is vertical not horizontal alignment.

--
Chris
Jul 20 '05 #6
<snip>
Are there CSS equivalents for any of these?
Jeff
<table style="border:1px #FFFFFF; padding:3px; margin:0px;">

Not quite - cellspacing is duplicated in CSS by border-spacing, not
margin (and even then only if border-collapse: separate is set).


That is the most complicated bit of CSS I've ever seen:

<URL: http://www.w3.org/TR/CSS2/tables.html >

What's the level of support for this? I'd hate to spend a day wading
through that and finding out the support is limited.

What's with this inline-table (that sounded easy)? I'm assuming this is
display: inline rather than display: block, but I don't have a clue how
to set that! Or is that it?

Maybe it'll make more sense after I've had more sleep, but I'm not so sure.

Jeff

And the padding should be on the tds, not on the table itself, to
duplicate the old cellpadding effect.

<div syle="text-align:center"><img src="" alt="" /></div>

Jul 20 '05 #7
Jeff Thies <je**@spamalanadingong.com> writes:
<snip>
Are there CSS equivalents for any of these?
Jeff

<table style="border:1px #FFFFFF; padding:3px; margin:0px;"> Not quite - cellspacing is duplicated in CSS by border-spacing, not
margin (and even then only if border-collapse: separate is set).


That is the most complicated bit of CSS I've ever seen:

<URL: http://www.w3.org/TR/CSS2/tables.html >

What's the level of support for this? I'd hate to spend a day wading
through that and finding out the support is limited.


Support is good. And once you've used it once it won't seem
complicated.

<table cellspacing="5" cellpadding="3" border="1">
to
<table class="styled">

table.styled {
border-spacing: 5px;
border-collapse: separate;
border: thin black solid;
}
table.styled td {
padding: 3px;
}

isn't too difficult.

Probably you'd be better in most cases taking advantage of CSS's
ability to set padding/spacing in em rather than px.
What's with this inline-table (that sounded easy)? I'm assuming this
is display: inline rather than display: block, but I don't have a clue
how to set that! Or is that it?


table {
display: inline-table;
}

Easy. Less well-supported than the rest. I've never needed to use it,
though.

--
Chris
Jul 20 '05 #8
"SpaceGirl" <NO*************@subhuman.net> a écrit dans le message de
news:2l************@uni-berlin.de
<table border="1" cellpadding="3" cellspacing="0">.. (...) Are there CSS equivalents for any of these?
<table style="border:1px #FFFFFF; padding:3px; margin:0px;">


I don't think the border="1" would be exactly reproduce by your border:1px
#FFFFFF; : this will just add a border around the table, not around each of
the cells...

Jul 20 '05 #9
"SpaceGirl" <NO*************@subhuman.net> wrote in
comp.infosystems.www.authoring.stylesheets:
<table style="border:1px #FFFFFF; padding:3px; margin:0px;">

oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">


oops: "0px" is unnecessary; use "0".

oops: #FFFFFF is white. I think you want #000 if you're trying to
match <table> attributes.

The bigger issue is that probably padding should be in ems not
pixels. Otherwise, why use CSS at all when the <table> tag is
already the way he wants?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #10
DU
Jeff Thies wrote:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff

table {border: 1px solid black; border-spacing: 0px;}
td, th {padding: 3px;}
img {vertical-align: middle;}

Note that MSIE 5.x and MSIE 6 do not support border-spacing. So, until
the next upcoming MSIE 7 fixes that, you should either use
cellspacing="0" or add the declaration border-collapse: collapse; to
your CSS rule (for table) if you want to collapse borders.

DU
Jul 20 '05 #11
Stan Brown wrote:
oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">

oops: "0px" is unnecessary; use "0".

oops: #FFFFFF is white. I think you want #000 if you're trying to
match <table> attributes.

The bigger issue is that probably padding should be in ems not
pixels. Otherwise, why use CSS at all when the <table> tag is
already the way he wants?


Yes I know what colour white is thank you. And the px *might* be
unrequired for zero values, but it's better than missing them off for
possive / negative values :) The OP was an obvious newbie, so I was
trying to make it easier...

--
x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
Jul 20 '05 #12
Stan Brown wrote:
oops: "0px" is unnecessary; use "0".


The specifications clearly state that units are _optional_ when a zero
value is given. I'm sure you know the meaning of the word "optional" and
understand that it is not incorrect to specify units in a zero case.

--
Dylan Parry
http://www.webpageworkshop.co.uk - FREE Web tutorials and references

Now playing: King Crimson - Discipline
Jul 20 '05 #13
DU
Stan Brown wrote:
"SpaceGirl" <NO*************@subhuman.net> wrote in
comp.infosystems.www.authoring.stylesheets:
<table style="border:1px #FFFFFF; padding:3px; margin:0px;">
oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">

oops: "0px" is unnecessary; use "0".


The "px" in "0px" might be unnecessary but for 2 reasons I would
recommend to add it even in such case:

1- readers of this post (not fully aware of strict error conditions in
CSS1) might think that "px" is optional and not adding it works anyway
in MSIE 5.x and MSIE 6 in backward compatible rendering mode. The truth
is that writing "px" is *only* optional for zero-length value. You can't
be wrong - whatever the browser, whatever the browser version, whatever
the rendering mode - if you always mention the length unit.

2- if you ever or later change the value from 0px to, say, 4px, then the
px string is already written. So, you won't forget to add it and you
won't need to write it. This is a good coding practice to adopt, just
like using curly braces even for single instruction.

DU
oops: #FFFFFF is white. I think you want #000 if you're trying to
match <table> attributes.

The bigger issue is that probably padding should be in ems not
pixels. Otherwise, why use CSS at all when the <table> tag is
already the way he wants?

Jul 20 '05 #14
On Tue, 13 Jul 2004 10:09:22 -0400, DU <dr*******@hotWIPETHISmail.com>
wrote:

2- if you ever or later change the value from 0px to, say, 4px, then the
px string is already written. So, you won't forget to add it and you
won't need to write it. This is a good coding practice to adopt, just
like using curly braces even for single instruction.


When may we omit the curly braces around a style rule again?

Did you mean the semicolon?
Jul 20 '05 #15
Neal wrote:
When may we omit the curly braces around a style rule again?
When used inline ;)
Did you mean the semicolon?


I'm sure he did.

--
Dylan Parry
http://www.webpageworkshop.co.uk - FREE Web tutorials and references

Now playing: Emerson, Lake and Palmer - Tank
Jul 20 '05 #16
DU
Neal wrote:
On Tue, 13 Jul 2004 10:09:22 -0400, DU <dr*******@hotWIPETHISmail.com>
wrote:

2- if you ever or later change the value from 0px to, say, 4px, then
the px string is already written. So, you won't forget to add it and
you won't need to write it. This is a good coding practice to adopt,
just like using curly braces even for single instruction.

When may we omit the curly braces around a style rule again?

Did you mean the semicolon?


No. I meant the controlled statement of a if instruction. Sorry if I was
not clear in my post (re-edited in a hurry). E.g.:

1)
if(boolean condition)
single statement

is a perfectly correct javascript instruction. And

2)
if(boolean condition)
{ single statement };

is also a perfectly correct javascript instruction.

The 2) example is a much better coding pratice. If I ever need to add
another statement, then the block code delimeters are already written.
If I don't ever need to add another statement, then the curly braces
help code readability.

Semi-colon are also another example of good coding practices: they help
code readability everywhere applicable as syntaxical separators in
javascript for statements and in stylesheets for CSS declarations.

DU

Jul 20 '05 #17

"Jeff Thies" <je**@spamalanadingong.com> wrote in message
news:BE****************@newsread3.news.atl.earthli nk.net...
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff


C'mon, Jeff. These kinds of posts are gonna get you killfiled. Get your
ass some books or something. It is one thing to ask a legitimate
brain-burner of a question, but when your post reflects that you've
obviously not bothered to do your own homework, people get pissed.

-Karl
Jul 20 '05 #18
For some odd reason, there's been a slew of partially correct
responses in this thread, and more heat then I'd expect from such a
simple question. Being foolish, I now stick my head in the lion's mouth.

Jeff Thies wrote:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">
<table cellspacing="0">
<!-- cellspacing is still required for IE 5.x Mac, which does not
recognize CSS border-spacing or border-spacing property -->

table {
border-collapse: collapse;
/* this will cause adjacent borders in table
to 'collapse' into one border */
}

td {
border: 1px solid black; /* borders around each cell */
padding: 3px; /* padding within each cell */
}
<img align="middle">


table img { /* assuming this image is inside the table */
vertical-align: middle;
}

And now, I wait to be shown how *I've* screwed up. Here's a preemtive :-P.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #19
Karl Groves wrote:
"Jeff Thies" <je**@spamalanadingong.com> wrote in message
news:BE****************@newsread3.news.atl.earthli nk.net...
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff

C'mon, Jeff. These kinds of posts are gonna get you killfiled. Get your
ass some books or something. It is one thing to ask a legitimate
brain-burner of a question, but when your post reflects that you've
obviously not bothered to do your own homework, people get pissed.


Well I've had my share of stupid posts. The earlier in the morning the
more likely. I'm more than a bit overextended.

It's not a trivial question although it seems that way. There's nothing
in CSS1 about tables. CSS2 support is more limited.

And as it turns out cellspacing is not obvious as it requires
border-collapse and border-spacing. Two properties that are not reliably
supported. That makes table borders in CSS a bit shaky.

Also, there appears to be no equivalent to <img align="middle"> The
obvious vertical-align: middle is a table cell thing.

Look at how far afield SpaceGirl had gotten by thinking these were
trivial (no offense meant).

Having said all that, I'll bear your advisory in mind.

Jeff


-Karl

Jul 20 '05 #20
Jeff Thies wrote:
Also, there appears to be no equivalent to <img align="middle"> The
Given that "middle" isn't an allowed value for the align attribute, I'll
assume you mean "valign".
obvious vertical-align: middle is a table cell thing.


'vertical-align'
Value: baseline | sub | super | top | text-top | middle | bottom |
text-bottom | <percentage> | <length> | inherit
Initial: baseline
Applies to: inline-level and 'table-cell' elements

Not just a table cell thing.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #21
Brian <us*****@julietremblay.com.invalid>
(news:10*************@corp.supernews.com) wrote:
For some odd reason, there's been a slew of partially
correct
responses in this thread, and more heat then I'd expect
from such a simple question. Being foolish, I now stick
my head in the lion's mouth.

Jeff Thies wrote:
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">
<table cellspacing="0">
<!-- cellspacing is still required for IE 5.x Mac, which
does not recognize CSS border-spacing or border-spacing
property -->

table {
border-collapse: collapse;
/* this will cause adjacent borders in table
to 'collapse' into one border */
}

td {
border: 1px solid black; /* borders around each cell */
padding: 3px; /* padding within each cell */
}
<img align="middle">


table img { /* assuming this image is inside the table */
vertical-align: middle;
}

And now, I wait to be shown how *I've* screwed up.


Right above :)
vertical-align should be set for the containing element (i.e. td), not the
contained (i.e. img).

Also, with border-collapse:collapse, cellspacing=0 is unnecessary
Here's
a preemtive :-P.


What's that do after P? Drooling? :)
Jul 20 '05 #22
>
The "px" in "0px" might be unnecessary but for 2 reasons I would
recommend to add it even in such case:


Yeah! why have these silly 'time saving' rules which are bound to cause
errors? also like you don't have to have a semicolon on the end of the last
declaration in a block, 'cos that wastes *so much* time!

RU
Jul 20 '05 #23
> Support is good. And once you've used it once it won't seem
complicated.

<table cellspacing="5" cellpadding="3" border="1">
to
<table class="styled">

table.styled {
border-spacing: 5px;
border-collapse: separate;
border: thin black solid;
}
table.styled td {
padding: 3px;
}

Hi Chris,

border-spacing and border collapse are CSS2 aren't they - can you really say
support is good? (Nav6 and Op5)

RU
Jul 20 '05 #24
On Tue, 13 Jul 2004 23:42:24 +0200, Mitja <nu*@example.com> declared in
alt.html,comp.infosystems.www.authoring.stylesheets:
Brian <us*****@julietremblay.com.invalid>
(news:10*************@corp.supernews.com) wrote:
Here's
a preemtive :-P.


What's that do after P? Drooling? :)


Nah, he missed a bit when shaving.

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
Jul 20 '05 #25
"Dylan Parry" <us****@dylanparry.com> wrote in
comp.infosystems.www.authoring.stylesheets:
Stan Brown wrote:
oops: "0px" is unnecessary; use "0".


The specifications clearly state that units are _optional_ when a zero
value is given. I'm sure you know the meaning of the word "optional" and
understand that it is not incorrect to specify units in a zero case.


Indeed I do. That's why I said "unnecessary" rather than
(your word) "incorrect".

Sheesh! Object to what I say, if I'm wrong, but it's a bit much to
have people object to something in their own minds that I didn't
say!

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #26
Mitja wrote:
Brian wrote:
Jeff Thies wrote:
<table border="1" cellpadding="3" cellspacing="0">
<table cellspacing="0">
<!-- cellspacing is still required for IE 5.x Mac, which
does not recognize CSS border-spacing or border-spacing
property -->

table {
border-collapse: collapse;
/* this will cause adjacent borders in table
to 'collapse' into one border */
}

td {
border: 1px solid black; /* borders around each cell */
padding: 3px; /* padding within each cell */
}

<img align="middle">


table img { /* assuming this image is inside the table */
vertical-align: middle;
}

And now, I wait to be shown how *I've* screwed up.


Right above :) vertical-align should be set for the containing
element (i.e. td), not the contained (i.e. img).


As I said, I was waiting to be shown up. I could note that vertical
align is applicable to inline elments, but that would be a dodge,
since the op was talking about a translation of table layout.
Also, with border-collapse:collapse, cellspacing=0 is unnecessary


Hold on there, cowboy. Cellspacing=0 most certainly is necessary, for
the reasons already given. (Look at the comments I put in my code
example.)
Here's a preemtive :-P.


What's that do after P? Drooling? :)


I was looking at someone eating ice cream. (Mmmm, ice cream....)

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #27
"Rupe" <ru**************@virgin.net> writes:
Support is good. And once you've used it once it won't seem
complicated.

<table cellspacing="5" cellpadding="3" border="1">
to
<table class="styled">

table.styled {
border-spacing: 5px;
border-collapse: separate;
border: thin black solid;
}
table.styled td {
padding: 3px;
}


Hi Chris,

border-spacing and border collapse are CSS2 aren't they - can you really say
support is good? (Nav6 and Op5)


Opera 5+ supports both properties.

IE5.0+ supports border-collapse but not border-spacing, so wide
cellspacing isn't possible. But generally people want to remove
cellspacing. [1]

NS6 supports border-spacing but not border-collapse (which it treats
as separate), so it gets a little odd with border-spacing: 0. But then
it's based on a pre-release Mozilla so bugs are to be
expected.

NS7/Mozilla 1.0+ support both properties.

Konqueror (3.2) has the same bug as NS6, but it's fixed in their CVS
so 3.3 will work fine - Safari, the other khtml browser, apparently is
fine with it, but I don't have one to test on.
The main problem is incorrect border-collapse support in NS6 and
Konqueror, and that's a minor cosmetic problem in two low-usage
browsers (and by the time Konqueror becomes high-usage, if it does,
this will be working).

[1] It's obviously bad for layout tables, but most data tables look
better with spacing '0' too.

--
Chris
Jul 20 '05 #28
> > Hi Chris,

border-spacing and border collapse are CSS2 aren't they - can you really say support is good? (Nav6 and Op5)

Chris wrote-------------------------------------

Opera 5+ supports both properties.

IE5.0+ supports border-collapse but not border-spacing, so wide
cellspacing isn't possible. But generally people want to remove
cellspacing. [1]

NS6 supports border-spacing but not border-collapse (which it treats
as separate), so it gets a little odd with border-spacing: 0. But then
it's based on a pre-release Mozilla so bugs are to be
expected.

NS7/Mozilla 1.0+ support both properties.

Konqueror (3.2) has the same bug as NS6, but it's fixed in their CVS
so 3.3 will work fine - Safari, the other khtml browser, apparently is
fine with it, but I don't have one to test on.
The main problem is incorrect border-collapse support in NS6 and
Konqueror, and that's a minor cosmetic problem in two low-usage
browsers (and by the time Konqueror becomes high-usage, if it does,
this will be working).

[1] It's obviously bad for layout tables, but most data tables look
better with spacing '0' too.

--
Chris


Hmm interesting, thanks Chris.

Can I lead you astray for a moment? Is that allowed?

I have a problem with printing running headers/footers on a 'printer
friendly' page with CSS (I don't mean the ones the browser tacks on).

I came across this solution (below), but it seems pretty universally
unsupported. I assumed this is because its a CSS2 solution and, I assumed,
CSS2 ain't supported yet in virtually all browsers.

But now I see from your erudite reply that even IE 5.0 has CSS2 features...?

So how do I find out which browsers will print accordingly the following,
extremely handy, piece of code?

Running header:

<style>
@page {
@top{font-family: Helvetica, Arial, sans-serif;
font-size: 150%;
font-weight: bolder;
text-align: left;
content: "XHTML-Print: A Proposal --- August 25, 2000";
}
}
</style>

Running footer:

<style>
@page {
counter-increment: pages;
@bottom{font-family: Times, Palatino, serif;
font-size: 80%;
font-weight: normal;
text-align: center;
content: "Page " counter(pages);
}
}
</style>

[ http://www.pwg.org/xhtml-print/HTML-...html#page_area ]

Or maybe there is a more universal approach to solving the problem...?

My apologies if I posted 'out of line'.

RU
Jul 20 '05 #29
"Rupe" <re**********************************************@ virgin.net> writes:
Can I lead you astray for a moment? Is that allowed?
It'd be better to start a new thread for it, or at least change the
subject line. That way other people who aren't watching the current
thread but do know the answer might help.
I came across this solution (below), but it seems pretty universally
unsupported. I assumed this is because its a CSS2 solution and, I assumed,
CSS2 ain't supported yet in virtually all browsers.
Isn't *completely* supported. Print styles less so than screen ones.
But now I see from your erudite reply that even IE 5.0 has CSS2 features...?
Even NS4 has the occasional CSS2 feature, it just implements them badly.
So how do I find out which browsers will print accordingly the following,
extremely handy, piece of code?
Um, make a page with that code in, download the browser, try to print
the page with it.
http://browsers.evolt.org/ for most browsers
http://www.insert-title.com/web_desi...i_IE#downloads
for older IE versions.
Running header:

<style> Should be <style type='text/css'>
<style>

Likewise

--
Chris
Jul 20 '05 #30

Um, make a page with that code in, download the browser, try to print
the page with it.
http://browsers.evolt.org/ for most browsers
http://www.insert-title.com/web_desi...i_IE#downloads for older IE versions.

Thanks again Chris.

I thought you might say that! thats a heck alot of downloading. I shall
start with NS6 and work backwards.
Even NS4 has the occasional CSS2 feature, it just implements them badly.


'Dead Men Don't Wear Plaid' - "Don't ever say Xcleaning ladyX NS4!"

Regards
RU

Jul 20 '05 #31
Chris Morris wrote:
IE5.0+ supports border-collapse but not border-spacing


IE 5+/*Win*, you mean. As I've written (twice in this thread!), IE
5.x/Mac does not support either. Thus, if the space is important to
you, you must set the table attribute cellspacing to 0.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #32
Brian <us*****@julietremblay.com.invalid> writes:
Chris Morris wrote:
IE5.0+ supports border-collapse but not border-spacing


IE 5+/*Win*, you mean. As I've written (twice in this thread!), IE
5.x/Mac does not support either. Thus, if the space is important to
you, you must set the table attribute cellspacing to 0.


Oops. Yes, I mean the windows version, usually I remember to make that
distinction.

--
Chris
Jul 20 '05 #33
Chris Morris wrote:
Brian <us*****@julietremblay.com.invalid> writes:
Chris Morris wrote:
IE5.0+ supports border-collapse but not border-spacing


IE 5+/*Win*, you mean. As I've written (twice in this thread!), IE
5.x/Mac does not support either. Thus, if the space is important to
you, you must set the table attribute cellspacing to 0.

Oops. Yes, I mean the windows version, usually I remember to make that
distinction.


I'm inclined to think of support for IE5 Mac as being important.

Not so for NS6 or Knonquerer. Ay least for presentational issues.

It seems like a lot of webdesign is waiting for the bad browsers to go
away! Is NS4 still around?

I'd like to thank everyone for the help on what was to me, not simple!

Jeff
Jul 20 '05 #34
Brian <us*****@julietremblay.com.invalid>
(news:10*************@corp.supernews.com) wrote:
Mitja wrote:
Brian wrote:
Jeff Thies wrote:

<table border="1" cellpadding="3" cellspacing="0">

<table cellspacing="0">
<!-- cellspacing is still required for IE 5.x Mac, which
does not recognize CSS border-spacing or border-spacing
property -->

table {
border-collapse: collapse;
/* this will cause adjacent borders in table
to 'collapse' into one border */
}

td {
border: 1px solid black; /* borders around each cell
*/ padding: 3px; /* padding within each cell */
}
<img align="middle">

table img { /* assuming this image is inside the table
*/ vertical-align: middle;
}

And now, I wait to be shown how *I've* screwed up.
Right above :) vertical-align should be set for the
containing element (i.e. td), not the contained (i.e.
img).


As I said, I was waiting to be shown up. I could note
that vertical align is applicable to inline elments, but
that would be a dodge, since the op was talking about a
translation of table layout.
Also, with border-collapse:collapse, cellspacing=0 is
unnecessary


Hold on there, cowboy. Cellspacing=0 most certainly is
necessary, for the reasons already given. (Look at the
comments I put in my code example.)


I think there's a typo in those comments. You clearly meant border-collapse
and yes, I did overlook it (BTW, NN4.x doesn't recognize it either) - mea
culpa.
Here's a preemtive :-P.


What's that do after P? Drooling? :)


I was looking at someone eating ice cream. (Mmmm, ice
cream....)

Jul 20 '05 #35
Mitja wrote:
Brian wrote:
Mitja wrote:
Brian wrote:

cellspacing is still required for IE 5.x Mac, which does not
recognize CSS border-spacing or border-spacing property

I think there's a typo in those comments. You clearly meant
border-collapse and yes, I did overlook it


I didn't notice my typo. It should have read "...does not recognize
border-spacing or border-collapse property".

As I feared, I think I may have confused matters more by trying to
correct the mistakes I saw.
(BTW, NN4.x doesn't recognize it either)


There's a lot NN4 doesn't recogize. And a lot it *does* recognize but
botches badly. At this point, I assume www authors do the simple and
sensible thing of hiding all CSS from that browser so that its users
can access the page without any real trouble.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #36
Brian <us*****@julietremblay.com.invalid>
(news:10*************@corp.supernews.com) wrote:
Mitja wrote:
Brian wrote:
Mitja wrote:

Brian wrote:

> cellspacing is still required for IE 5.x Mac, which
> does not recognize CSS border-spacing or
> border-spacing property
I think there's a typo in those comments. You clearly
meant border-collapse and yes, I did overlook it


I didn't notice my typo. It should have read "...does not
recognize border-spacing or border-collapse property".

As I feared, I think I may have confused matters more by
trying to correct the mistakes I saw.
(BTW, NN4.x doesn't recognize it either)


There's a lot NN4 doesn't recogize. And a lot it *does*
recognize but botches badly.

Oh yessss:)
Just today I had to patch up a site to look a bit less revolting in NN4. The
little joys of life...
At this point, I assume www
authors do the simple and sensible thing of hiding all
CSS from that browser so that its users can access the
page without any real trouble.

Hiding all css might be going a bit far. At least some borders, backgrounds
and such are welcome to show the structure of the page more clearly.
Jul 20 '05 #37
Mitja wrote:
Brian wrote:
Mitja wrote:
Brian wrote:
There's a lot NN4 doesn't recogize. And a lot it *does* recognize
but botches badly.

At this point, I assume www authors do the simple and sensible
thing of hiding all CSS from that browser so that its users can
access the page without any real trouble.


Hiding all css might be going a bit far.


I must disagree. Its reported use is 5% or lower, and dropping.
At least some borders, backgrounds and such are welcome to show the
structure of the page more clearly.


Sure. But it takes too much effort to figure out what *won't* make the
page explode in Netcape 4.x. I used to do it. Debugging, one CSS
property at a time, is quite labor-intensive, with not much payback.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #38

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Allen F. | last post: by
reply views Thread by Woody Lemcke | last post: by
2 posts views Thread by Jeffrey Bradshaw | last post: by
3 posts views Thread by Edward Diener | last post: by
6 posts views Thread by Harry Strybos | last post: by
2 posts views Thread by Harry Strybos | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.