?
Solved

css alternative to nbsp?

Posted on 2006-07-10
5
Medium Priority
?
4,519 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 800 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmakerā€¦
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.
Suggested Courses

777 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