td tag border

J

Jukka K. Korpela

2011-11-20 21:53 said:
I see a lot of this:<td>&nbsp;</td>

Yes, and it usually helps, but sometimes it's not applicable. Using the
no-break space implies some minimal width and height for the cell, and
this might not desirable in contexts where a cell with empty contents is
used.

Workarounds include the use of a single-pixel transparent image. But
usually solutions are better than workarounds: ask yourself why the cell
is empty, and you may find a reason to put some actual content there.
More on this:
http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html
 
R

Ray_Net

Yes, and it usually helps, but sometimes it's not applicable. Using the
no-break space implies some minimal width and height for the cell, and
this might not desirable in contexts where a cell with empty contents is
used.

Workarounds include the use of a single-pixel transparent image. But
usually solutions are better than workarounds: ask yourself why the cell
is empty, and you may find a reason to put some actual content there.
More on this:
http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html

Very good examples in your page rendered differently if using IE9 or
SeaMonkey. With SeaMonkey, we dont have a border for the two cases and
for the one pixel picture, the row is minimized with SeaMonkey and as
high as the other with IE9.
 
J

Jukka K. Korpela

2011-11-21 1:07 said:
Very good examples in your page rendered differently if using IE9 or
SeaMonkey. With SeaMonkey, we dont have a border for the two cases and
for the one pixel picture, the row is minimized with SeaMonkey and as
high as the other with IE9.

I'm not sure of what you mean here. I just downloaded and installed
SeaMonkey on Windows 7 Pro and checked the page on it. As far as I can
see, SeaMonkey draws borders around cells containing &nbsp;.

And both on IE 9 and Seamonkey show a "minimized" row when the only cell
contains only a one-pixel image. (The row is a few pixels high due to
default cellpadding.)

Are you using some special environment or setting=
 
R

Ray_Net

I'm not sure of what you mean here. I just downloaded and installed
SeaMonkey on Windows 7 Pro and checked the page on it. As far as I can
see, SeaMonkey draws borders around cells containing &nbsp;.

And both on IE 9 and Seamonkey show a "minimized" row when the only cell
contains only a one-pixel image. (The row is a few pixels high due to
default cellpadding.)

Are you using some special environment or setting=

All my settings are the default settings.
You can see the screen-copies SM-1, SM-2, IE9-1 and IE9-2 here
http://cjoint.com/?0KwaY0MytYX
 
B

BootNic

On Mon, 21 Nov 2011 11:27:02 +0200

[snip]
And both on IE 9 and Seamonkey show a "minimized" row when the only cell
contains only a one-pixel image. (The row is a few pixels high due to
default cellpadding.)

As they do with an empty cell yes?

[snip]



--
BootNic Mon Nov 21, 2011 10:27 pm
"They may forget what you said, but they will never forget how you made them
feel."
*Carl W. Buechner*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7LFrQACgkQOcdbyBqMFBHq7wCfWa0UkTUhqGCHbmWC5kL+Lb0E
k3YAoLGv5hD3kGHr9kCWCsU+0JkBFCZw
=LojE
-----END PGP SIGNATURE-----
 
B

BootNic

Why the td tag has no border if it's empty ? How to fix that ?

Update the browser.

Failing in that effort … one may try to add frame="border" to thetable.

https://docs.google.com/leaf?id=0B...zQyNC00MWZmLWIyYzUtYWFkZmFjNjM5NmVl&hl=en_US


--
BootNic Mon Nov 21, 2011 10:39 pm
The human mind treats a new idea the same way the body treats a strange
protein; it rejects it.
*P. B. Medawar*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7LGYAACgkQOcdbyBqMFBG7VwCg0UYMnIrcy1AOePjJ6ApfYEBm
kh4AoKGC6kCupFStB+Sq0tO5H1vsY6aR
=/dKl
-----END PGP SIGNATURE-----
 
J

Jukka K. Korpela

2011-11-22 1:55 said:
You can see the screen-copies SM-1, SM-2, IE9-1 and IE9-2 here
http://cjoint.com/?0KwaY0MytYX

Thank you, this helps. The SeaMonkey rendering seems to have borders
around the empty cell - but the border style is the browser default,
which may not look like a real border. I have modified my page
http://www.cs.tut.fi/~jkorpela/html/emptycells.html
to set border style, color, and width more prominent.

On IE, it's more complicated. The rendering on IE 9 depends on the
browser mode and on its idea of document mode - a real mess. If you F12
on IE 9, you can test the effects of various modes. In the modern modes,
IE 9 shows a border even around empty cells, so the problem does not
appear there. But the dual problem exists: if you do _not_ want borders
around an empty cell, you need to explicitly prevent them. Luckily this
is easy on modern browsers using CSS (either set empty-cells: show on
the table element or set border: none on the cell).
 
R

Ray_Net

Thank you, this helps. The SeaMonkey rendering seems to have borders
around the empty cell - but the border style is the browser default,
which may not look like a real border. I have modified my page
http://www.cs.tut.fi/~jkorpela/html/emptycells.html
to set border style, color, and width more prominent.

On IE, it's more complicated. The rendering on IE 9 depends on the
browser mode and on its idea of document mode - a real mess. If you F12
on IE 9, you can test the effects of various modes. In the modern modes,
IE 9 shows a border even around empty cells, so the problem does not
appear there. But the dual problem exists: if you do _not_ want borders
around an empty cell, you need to explicitly prevent them. Luckily this
is easy on modern browsers using CSS (either set empty-cells: show on
the table element or set border: none on the cell).

There is still a problem on the example number 4 with the little pic of
one pixel in the cell. With SM the row height is null - with IE9 this
row have the same height as the others.
 
J

Jukka K. Korpela

2011-11-23 12:33 said:
There is still a problem on the example number 4 with the little pic of
one pixel in the cell. With SM the row height is null - with IE9 this
row have the same height as the others.

It seems that from version 8, IE imposes some minimum height on a cell
that contains an image, even when there is no text in the cell. Firefox
does that, too. I wonder why they have made this change, as it probably
breaks many layouts (though maybe not very seriously).
 
J

Jonathan N. Little

Ray_Net said:
There is still a problem on the example number 4 with the little pic of
one pixel in the cell. With SM the row height is null

Not in my SeaMonkey! Not even with Mozilla 1.0 the "daddy" of SeaMonkey...
 
J

Jonathan N. Little

Jukka said:
I can't explain that, but I have now modernized the page
http://www.cs.tut.fi/~jkorpela/html/emptycells.html
somewhat and added notes about preventing borders.

Maybe you misunderstood me, the 1px GIF worked just fine in my SeaMonkey
and even an old Mozilla 1.0 that I have running an a VM. This is in
contrast to what Ray wrote, I don't think it is SeaMonkey but some other
factor on his setup...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top