Questions tagged [cellpadding]

Cellpadding is HTML padding, as specific to table cells.

Cellpadding is HTML padding, as specific to table cells.

The term 'cellpadding' goes back to the now-obsolete cellpadding attribute that was used to control this feature in older versions of HTML. This technique is now deprecated, and use of CSS to control layout is preferred. Therefore, one should use the CSS padding property rather than the cellpadding attribute.

A detailed discussion of how to achieve cellpadding and cellspacing using modern CSS can be found here: Set cellpadding and cellspacing in CSS?

58 questions
52
votes
6 answers

Why are cellspacing and cellpadding not CSS styles

I don't know why this bothers me so much, but when I create websites, I always try to do all my styling with CSS. However one thing I always have to remember to do when I'm working with tables is add cellspacing="0" and cellpadding="0" Why is there…
Ryan Smith
  • 8,344
  • 22
  • 76
  • 103
29
votes
5 answers

Html: Difference between cell spacing and cell padding

What is the difference between cell spacing and cell padding?
Explorer
  • 301
  • 1
  • 3
  • 4
15
votes
6 answers

Removing the extra padding in a GridView in android

I want to remove the extra padding that appears in a grid view. I have images of the size 128*128 which will be occupying cells in the grid. But somehow there is an extra space that gets added to the contents of the grid. After some research, I was…
Anand Sainath
  • 1,807
  • 3
  • 22
  • 48
14
votes
3 answers

HTML / CSS formatting: TRUE spacing between cell <-> cell, not between cell <-> any

I'm looking for hints regarding the spacing between table cells. I'm aware of cellspacing / cellpadding in HTML and their CSS equivalents border-spacing / padding, but they're doing more that what I would expect when going by their names. What I…
MrCC
  • 714
  • 8
  • 20
10
votes
1 answer

ITextSharp 4.1.6. PDF Table - how to remove whitespace on top of each cell? [padding and leading already set to 0]

I'm having a problem with ITextSharp's tables. I'd like to have cells without top & bottom padding, so that they are placed closer to each other. Although I have set the padding and the leading of the cell to 0, the white-space still remains. Does…
Bruno Laurinec
  • 910
  • 2
  • 11
  • 27
5
votes
3 answers

Removing table cell padding in Migradoc PDF

I'm trying to remove some unwanted padding in a Migradoc-generated PDF; but so far no luck. I went to the Migradoc forum, but couldn't find any issues that were the same as mine (and I didn't want to register on yet another site to ask a single…
peter3
  • 1,074
  • 13
  • 22
4
votes
6 answers

Adding space between cells in a section in swift 2

I need to add padding so space between each cell in each section in swift 2.1 but all I managed to do was adding header for section which I don't want that. how can I add space between dynamic table cells? Here is the code for adding header: …
anonymox
  • 419
  • 1
  • 9
  • 32
4
votes
1 answer

CSS padding right and text-align right don't work together in table cell

td.myclass{ width: 6em; text-align: right; padding-right: 2em; } As you can see, I'd like to have the text in the cell right aligned, 2em from the right cell border. This doesn't work. The text is right aligned but it stays stuck on the…
John Smith Optional
  • 22,259
  • 12
  • 43
  • 61
4
votes
4 answers

How to set table cell padding from CSS?

I am struggling with a cell padding issue in a given HTML table (generated by Drupal). The table is the following: I tried the following: .view-thumbnails-of-tips-and-tricks { padding: 10px 10px 10px 10px; } I want to adding padding around…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
3
votes
2 answers

Table-cell inside div has extra top padding

I have parent div called "box", and inside it there's a child div, "innerbox". innerboox holds text and a quote mark icon in the top left corner. However, there's an extra line / spacing at the top of the innerbox div, and I don't know how to get…
Gabriel
  • 103
  • 1
  • 4
  • 13
3
votes
2 answers

html5 compliant cellpadding in only some tables without editing td elements

Maybe I am being too picky. I want to put cell padding in some tables but not others, without editing every single td element. I would like to make it html5 compliant, which means not using the cellpadding property of the table. But I would like…
freediver
  • 33
  • 2
2
votes
2 answers

DataTables PDF Export Cell Padding

Is there a way to decrease cell padding in the PDF exported by DataTables? PDFMake playground states that editing cell padding is possible while exporting tables, but I haven't come across any code example doing that. Any help is appreciated.
Nikhil
  • 61
  • 1
  • 6
2
votes
1 answer

How to set individual table cell padding?

I have made bars in a waterfall diagram that I want to be look like blocks on each other. They are inline-blocks programmatically set to a width and adjusted sideways by margin-left. The javascript to set innerHTML is irrelevant in this case, but…
user985399
2
votes
5 answers

How can I minimize the top and bottom "padding" for HTML table cells?

I try to render a table with as litte text cell padding above and below as possible. The snippet below shows what I have done so far. However it still contains visible top and bottom "padding" for the cell text. What other CSS options exist to…
mjn
  • 36,362
  • 28
  • 176
  • 378
2
votes
1 answer

css not to overwite table cellpadding='10'

I have an html editor (ckeditor). I can make space easily with it that gave me that code I have some css above this code which break my first line of ckeditor. so cellpadding is useless and that is not what I am looking for I tried a class nostyle…
Frederic CS
  • 89
  • 1
  • 6
1
2 3 4