Solved

css alternative to nbsp?

Posted on 2006-07-10
5
4,502 Views
Last Modified: 2008-01-09
Hi all, does anyone know any alternatives to using   to avoid the 'dissapearing border' problem when TD cells have no value. To clarify, i have an html table where data is populated from a database. When the value if 'blank' the border dissapears....the only way i know of getting round this is to use the   in place of the value. It would be nicer though if there was a css property that i could apply to the cell to prevent the border from dissapearing.

thanks in advance.

Dave
0
Comment
Question by:javabeat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:bruno
ID: 17072642
Yes, there is something:

emtpy-cells: show

http://www.blooberry.com/indexdot/css/properties/table/emptycell.htm

you can specify whichever behavior you want, you need to use the seperated border model:
http://www.blooberry.com/indexdot/css/properties/table/bcollapse.htm
0
 

Author Comment

by:javabeat
ID: 17073411
Hi brunobear, didn't seem to do the trick for me? if the cell has no contents the border remains invisible...i'm using a fairly recent version of IE but maybe i'm missing something...
0
 
LVL 13

Expert Comment

by:PraxisWeb
ID: 17074258
IE does not support that particular CSS attribute (yet)
0
 
LVL 18

Accepted Solution

by:
bruno earned 200 total points
ID: 17116341
sorry i didn't test first....how about this?



      <style type="text/css" media="screen" title="style">
            table {
                  border-collapse: collapse;
            }
            td {
                  border: 1px solid gray;
                  height: 30px;
                  width: 30px;
            }
      </style>      



<table>
<tr>
      <td>1</td>
      <td></td>
      <td>3</td>
</tr>
<tr>
      <td></td>
      <td>5</td>
      <td></td>
</tr>
<tr>
      <td></td>
      <td></td>
      <td></td>
</tr>
<tr>
      <td></td>
      <td></td>
      <td></td>
</tr>
</table>
0
 

Author Comment

by:javabeat
ID: 17118553
much appreciated!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question