Questions tagged [css-tables]

Use this tag instead of just [css] for questions about styling HTML

elements with CSS, or about using the CSS display:table property declaration to define an element's layout to mimic that of an HTML
.

The tag should be used in preference over the tag for questions about using CSS to present <table> or table-like content in HTML pages.

Typically, these activities involve:

  • Styling HTML <table> elements with CSS, and/or
  • Using the CSS display: table property declaration to define an element's layout to mimic that of an HTML <table>.

References

2231 questions
0
votes
4 answers

How to add an horizontal scrollbar to a table with unfixed width?

I want to add an horizontal scrollbar to a table. However the user can add row to the table, so its width must change. A row is 100px width so with 10 rows, my table have a width of 1000px but the div who contain the table is only 800px width. I…
Paulin Benoit
  • 13
  • 1
  • 8
0
votes
1 answer

Different behavior on table cell width: 0 cross browsers

table { width: 100%; border-spacing: 0; border-collapse: collapse; } td { padding: 0; margin: 0; border: 1px solid black; }
leftright
Here is a code snippet: We set width of table to…
tsh
  • 4,263
  • 5
  • 28
  • 47
0
votes
2 answers

position:sticky in div tables

Is it possible to obtain the position: sticky effect on an HTML table build up using just divs and css? Apparently if I try to add the position: sticky rule to the header, which already contains the display: table-header-group rule, the sticky…
Lc0rE
  • 2,236
  • 8
  • 26
  • 34
0
votes
3 answers

How to format only one table with css

I'm trying to select one specific table on one html page to be formatted with css. I do not want any other tables anywhere else, including on the same page, to be formatted this way. I tried this inside the header but it did not work-