Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Table Cells - Hiding One Cell

Tags:

html

css

I have a html table that I have setup in a 3 rows by 2 column formation. So basically have 6 cells that are currently being displayed to the suer.

My question is an unsure how to do, is that I only want to use 5 cells only visible to the user so would like to somehow remove cell position (3,2), so that it doesn't show any borders at all for that cell alone - can this be done, if so, how?

Thanks.

like image 572
tonyf Avatar asked Sep 04 '10 16:09

tonyf


People also ask

How do you make a cell invisible in HTML?

To hide a column entirely from view, meaning it will not be displayed in either the normal or details row, simply use the visible column option and set it to false . This example shows a table where the first column ID is completely hidden from view using the data-visible column attribute.

How do I hide one row in HTML?

A hidden attribute on a <tr> tag hides the table row. Although the table row is not visible, its position on the page is maintained.

How hide data from table in HTML?

Approach 1: Select the header using a CSS selector and modify the style property such that the value of the display property is set to none. This will hide the selected table header element from the page. Example: html.


2 Answers

look up the css properties border-collapse and empty-cells

Ref: http://www.quirksmode.org/css/tables.html

Scroll down the page and look at the examples of empty-cells:hide also check the browser compatibility chart at the top of the page.

like image 149
Moin Zaman Avatar answered Oct 17 '22 01:10

Moin Zaman


Try setting the CSS on the cell you want to hide to visbility: hidden; - that will not show the cell, but it'll still take up space. See the reference: http://www.w3schools.com/cssref/pr_class_visibility.asp

like image 4
user1343331 Avatar answered Oct 17 '22 01:10

user1343331