Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-27-2005, 10:17 PM   PM User | #1
canadianjameson
Senior Coder

 
Join Date: Jul 2003
Location: My pimped-out igloo in Canadia
Posts: 1,966
Thanks: 36
Thanked 0 Times in 0 Posts
canadianjameson is an unknown quantity at this point
table { empty-cells: show } doesn't seem to work

hey, quick and easy question. i have a CSS problem whereby Table { empty-cells: show } won't seem to work. any ideas?

here's my code. I bolded the affected parts
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Hairy Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
function showLinks(n){
  var el=document.getElementById(n);
  var p=el.parentNode;
  for(var i=0;i<p.childNodes.length;i++){//check all of n's siblings (n's parent's childen)
    if(p.childNodes[i].style && p.childNodes[i].style.display=='block'){//find who is displaying
      p.childNodes[i].style.display='none';
      if(p.childNodes[i]==el) return;//remove this line to remove toggling action
      break;
      }
    }
  el.style.display='block'
  }
</script>

<style type="text/css">
table { 
  empty-cells: show }
td {
  text-align: center }
</style>
</head>

<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td width=25%><a href="#" onClick="showLinks('class1');return false">Link 1</a></td>
    <td width=25%><a href="#" onClick="showLinks('class2');return false">Link 2</a></td>
    <td width=25%>Link 3</td>
    <td width=25%>Link 4</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2">
		<div id="class1" style="display: none">Link 1.1 | Link 1.2</div>
		<div id="class2" style="display: none">Link 2.1 | Link 2.2</div>
		<div id="class3" style="display: none"></div>
		<div id="class4" style="display: none"></div>
</td>    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
__________________
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)
canadianjameson is offline   Reply With Quote
Old 05-28-2005, 04:48 AM   PM User | #2
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
It seems to work for me (FF, OS X)... what are you trying to have it display as?
__________________
drums | web
rmedek is offline   Reply With Quote
Old 05-28-2005, 06:59 AM   PM User | #3
canadianjameson
Senior Coder

 
Join Date: Jul 2003
Location: My pimped-out igloo in Canadia
Posts: 1,966
Thanks: 36
Thanked 0 Times in 0 Posts
canadianjameson is an unknown quantity at this point
doesnt work in IE

will something else work?
__________________
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)
canadianjameson is offline   Reply With Quote
Old 05-30-2005, 10:42 AM   PM User | #4
KaZaK
New to the CF scene

 
Join Date: Apr 2005
Location: Norway, Haugesund
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
KaZaK is an unknown quantity at this point
Only alternate I know of is to put &nbsp; in every empty cell.
KaZaK is offline   Reply With Quote
Old 05-30-2005, 11:03 AM   PM User | #5
mrruben5
Regular Coder

 
Join Date: Nov 2004
Location: The Netherlands
Posts: 551
Thanks: 0
Thanked 0 Times in 0 Posts
mrruben5 is an unknown quantity at this point
you know this? <img src="blabla" alt="blabla" />
Well... <div /> and <td />
__________________
CATdude about IE6: "All your box-model are belong to us"
mrruben5 is offline   Reply With Quote
Old 05-30-2005, 02:24 PM   PM User | #6
canadianjameson
Senior Coder

 
Join Date: Jul 2003
Location: My pimped-out igloo in Canadia
Posts: 1,966
Thanks: 36
Thanked 0 Times in 0 Posts
canadianjameson is an unknown quantity at this point
ya, i actually ended up throwing in a 1px div to keep the cell visible :P
__________________
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)
canadianjameson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:46 AM.


Advertisement
Log in to turn off these ads.