By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

hide <td> value in html table?

nirmalsingh
100+
P: 218
i want to hide a td value to the users. how to make hide the values in <td> of html table? i have tried width=0px, width="0%". but it doesnt works.
Feb 15 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,892
You are probably wanting something like this (Javascript):

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2.     function toggleVisibility(me){
  3.         if (me.style.visibility=="hidden"){
  4.             me.style.visibility="visible";
  5.             }
  6.         else {
  7.             me.style.visibility="hidden";
  8.             }
  9.         }
  10. </script>
  11.  
[html]
<div onclick="toggleVisibility(this)" style="position:relative">
Some sample Text</div>
<div>I don't move</div>
[/html]
Or if you want to use CSS:
Expand|Select|Wrap|Line Numbers
  1. visibility: hidden;
  2.  
Feb 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.