Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing style in an empty td

Status
Not open for further replies.

dendenners

Programmer
Jul 17, 2001
110
IE
Hi there,
I wrote in here last week to get information on how to get a black border on the right edge only of a <td>. I was advised the use the following code in my css file:
td.blahblah{
border-right:1px solid-black; color: black;
}
This works fine, except for one case. When there is no data in the cell, i.e. when it appears in the page as
<td class=blahblah></td>
In this case no style appears. Is there a way around this?
Thanks
 
Hi dendenners,

Just put the space in it:

<td class=blahblah>&amp;nbsp;</td>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
That is actually the way I have it at the moment. The problem is that some of my <td>'s contain data that is dynamically evaluated at runtime, so I would be happy if there was a way of showing the style without putting in &nbsp;. I take it from your suggestions that there isn't.
 
Hi Cian,

I struggled also in the beginning with this issue LOL
(took me days to figure out)
I will tell you the secret.
When you just write &amp;nbsp; you will see nothing because this editor see it as a space.

But if you write &amp;amp;nbsp; you will see it like my post.

So to make it difficult LOL : to explane you how to display &amp;amp;nbsp; I had to write &amp;amp;amp;nbsp;

oooh no (LOL) now I had to write &amp;amp;amp;amp;nbsp;

etc, etc,

Hop this helps you Cian,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi dendenners,

I don't know how you dynamically evaluated the data in the TD (server side script ??? ) but let this script do the job for you:

If <field> is null/empty/&quot;&quot; (just 3 examples here)
then <data in TD> is &amp:nbsp;

or someting like that,

Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top