Solved

css alternative to nbsp?

Posted on 2006-07-10
5
4,513 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
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…
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…

726 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