473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Removing a column from a table

KeredDrahcir
426 256MB
I have a table. I can't change the structure but I need to remove a column from it. I used the nth-child() pseudo-class to set the display of the column to none but there are three rows at the bottom and they have a colspan set so now I'm getting a gap on the upper rows where the column is missing.

Is it possible to adjust the table in anyway, I'm prepared to use JavaScript to change the table so that they colspan is reduced?

What are the options?
Expand|Select|Wrap|Line Numbers
  1. <table width="100%" border="0" cellpadding="2" cellspacing="1" id="id">
  2.   <tr>
  3.     <td>content</td>
  4.     <td>content</td>
  5.     <td>content</td>
  6.     <td>content</td>     
  7.     <td>content</td>
  8.     <td>content</td>
  9.   </tr>
  10.   <tr>
  11.     <td align="center">
  12.       content
  13.     </td>
  14.     <td>content</td>
  15.     <td>
  16.       <table  border="0" align="left">
  17.         <tr>
  18.           <td align="left">content</td>
  19.           <td>content</td>
  20.           <td align="right">content</td>
  21.         </tr>
  22.       </table>
  23.     </td>
  24.     <td align="center">content</td>
  25.     <td align="right">content</td>
  26.     <td align="right">content</td>
  27.   </tr>
  28.   <tr>
  29.     <td colspan="5" align="right">content</td>
  30.     <td align="right">content</td>
  31.   </tr>
  32.   <tr>
  33.     <td colspan="5" align="right">content</td>
  34.     <td align="right">content</td>
  35.   </tr>
  36.   <tr>
  37.     <td colspan="5" align="right">content</td>
  38.     <td align="right">content</td>
  39.   </tr>   
  40.   <tr>
  41.     <td colspan="5" align="right">content</td>
  42.     <td align="right">content</td>
  43.   </tr>
  44. </table>
  45.  
It's the fifth column I'd like to hide.
Jul 23 '12 #1
3 2059
Rabbit
12,516 Expert Mod 8TB
There's no way to do it in just CSS if you're not allowed to change the HTML. However, if you're allowed to, use JavaScript to change the structure of the table.
Jul 23 '12 #2
KeredDrahcir
426 256MB
I'm prepared to use JavaScript but can't find the code to do it. Are you able to help me there?
Jul 30 '12 #3
Rabbit
12,516 Expert Mod 8TB
Well, in all honesty, if you don't know javascript, it would be a lot easier if you asked them to allow you to edit the HTML table rather than working around it through javascript. Because javascript can be disabled by the user and then the table would be wrong anyways.
Jul 30 '12 #4

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

Similar topics

1
by: Not Me | last post by:
Hi, I'm sure this is a common problem.. to create a single field from a whole column, where each row would be separated by a comma. I can do this for a specified table, and column.. and I've...
11
by: Peter Foti | last post by:
Hi all, I have a form that contains a 2 column table. In the left column is the description for a particular input (ie - "First Name", "Last Name", "Phone Number", etc.). In the right column...
3
by: Kathy | last post by:
Hi and thanks in advance for your help! I have Access 2000. I have imported a delinited text file and now have table with one column containing 100 records. I would like to display these values in...
2
by: Hymer | last post by:
Hello, I have a small two-column table with three rows. The first column has a logo and the second column has the name of the organization. The logo's in the first column are too high. That...
5
by: Hymer | last post by:
Hello, I have a small two-column table with three rows. The first column has a logo and the second column has the name of the organization. The logo's in the first column are too high. That...
10
by: ste | last post by:
Hi there, I'm trying to query a MySQL database (containing image data) and to output the results in a HTML table of 3 columns wide (and however many rows it takes) in order to create a basic...
1
by: akress | last post by:
Hiya, I'm trying to convert a table with 6 colums that looks like this: <table class="myTable" width="640px"> <tr> <td><a href="#"> <img src="../_img/announce.gif" align="middle"...
1
by: kelvin.koogan | last post by:
I want to display a two column multi-row table in a Windows Forms app. I want the user to be able to edit all values in both columns. Table will need to scroll vertically. What is the best...
3
by: Csaba Gabor | last post by:
I have a table with 3 rows, and two pieces of data to display in each row. However, the first element of the last two rows and the 2nd element of the 1st row are very short. This would seem to...
0
by: santusapi | last post by:
Hello All, I am facing problem while removing the columns from AdvancedDataGrid. It is crashing at one point and i am unable to resolve it. The code i'm using to remove the columns is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.