Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

table with background

0 views
Skip to first unread message

Dmitry Akselrod

unread,
Jun 6, 2002, 6:39:28 PM6/6/02
to
Hi everyone,

I am having this problem:

I am trying to create a table with a height of 1 px or 2 px and give this
table a background color. When this file is viewed in communicator v. 4.72
or later, the background color does not show up. The only way I have been
able to bring out the background color of the table is by insert some soft
of text or symbol into one of the cells. However, at that point, the table
grows to accomodate the font size, and defeats the height limit of 1 px.

Is there a way around this? via javascript and the document object?

Thanx,

Dmitry


Kae Verens

unread,
Jun 7, 2002, 8:12:45 AM6/7/02
to

table cells "collapse" when they have no content. a solution is to place
a 1x1 transparent image there.

presuming you are using this to make a visible line, why don't you just
use <hr />?

--
Kae Verens
http://www.contactjuggling.org/users/kverens/
http://www.contactjuggling.org/ (webmaster)
http://www.independentmix.com/ (tech guru)

Tony Swain

unread,
Jun 8, 2002, 8:08:16 PM6/8/02
to
>Dmitry Akselrod wrote:
>Hi everyone,
>I am having this problem:

>I am trying to create a table with a height of 1 px or 2 px and give this
>table a background color. When this file is viewed in communicator v.
4.72
>or later, the background color does not show up. The only way I have been
>able to bring out the background color of the table is by insert some soft
>of text or symbol into one of the cells. However, at that point, the
table

>grows to accommodate the font size, and defeats the height limit of 1 px.


>Is there a way around this? via javascript and the document object?
>Thanx,
>Dmitry

This is not relevant to java and some people get irate at cross posting.

Nonetheless, if the cell is empty, then it will be invisible.
If you want it to be one pixel, then here is what I suggest you do.
Make a one pixel transparent gif and paste it in there.
Also use the table's "cell" color attribute instead of the table.
In the past I have noted this has a more constant result across
browsers when compared to the table attribute
Good Luck!

--
Tony Swain
Senior V.P. of Software Development Hyperbyte inc.
http://www.hyperbyte.ab.ca
Netscape DevEdge Champion Devs-Java Newsgroup
snews://secnews.netscape.com/netscape.devs-java

0 new messages