Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

How to generate a table with cells merged in a column [duplicate]

This is the table I expect: And I used this code, but did not get the expected result <table border="1" align="center" cellpadding="10px"> <thead> <tr> <th>a&...
monika's user avatar
  • 13
4 votes
3 answers
111 views

Split headerless html table rows 50% left and 50% right

I have 20 rows like this in a standard html table (table>tbody>tr>td) without a header. current situation <table> <tbody> <tr> <td>1</td> ...
Rob C's user avatar
  • 43
1 vote
1 answer
38 views

Adding Border Styling to Table Row Headings and Colum Headings

I would greatly appreciate some help with this, if possible. I'm trying to add some global CSS styling to tables that are automatically generated by our company platform's HTML editor, but running ...
VeeSands's user avatar
1 vote
1 answer
342 views

How do you make one column with a fixed width and another one with auto width in <table> using css?

I am making a table with resizable columns and facing an issue I cannot resolve. I need to enable a user to drag the side of a column to resize it and reset the width if they want to. By resizing it, ...
Andrew Slock's user avatar
0 votes
1 answer
462 views

Create an 8.5x11 or A4 Letter Size Page with Tables for Text

I would like to create an A4 or 8.5x11 page that would look like what I have attached. One page has a 3" top margin, 2 vertical lines, 1" margin left/right with line numbers on the left., ...
Off Grid's user avatar
-1 votes
1 answer
179 views

Table cell borders are transparent when fixing them

I am trying to create a Svelte table component (although I think Svelte has nothing to do with this) that can have fixed columns. The basic logic seems to be working but there is a very strange ...
José Ramírez's user avatar
-1 votes
2 answers
85 views

HTML table won't make content occupy full-width

I have made this table that holds html elements inside: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=...
Kotynho's user avatar
  • 23
0 votes
1 answer
58 views

css table th and td not taking 100% of the width

I would like to make th and td both 100% width by only manupulating css. It seems like th stretches out far but never fully to push out the td. What's wrong with this code? .custom-table { ...
Mulllu S's user avatar
0 votes
0 answers
107 views

How do I use colgroup in HTML / CSS for better formatting Tables?

I got a Problem with the Tables on my HTML Page. How my Table looks now I'm trying to restrict the columns to a special value so that the Time column is smaller than the rest of the weekday columns. &...
The_Moviemonster's user avatar
1 vote
1 answer
95 views

Cell line break changes table layout

I have a table with a fixed width. Here the last two rows should always be without breaks. However, the table layout is changed if another cell has more content and therefore has to wrap. I've already ...
ToastStudios's user avatar
0 votes
1 answer
53 views

How do i change the darkness in the border groove?

i was using the groove border but i found out the darkness of some parts dont look dark enough.i have no idea what the command can be when needing to be changed. i was trying to creat the exact same ...
TK0546's user avatar
  • 1
0 votes
0 answers
147 views

Sticky table column vibrates on vertical scroll

I have a html table where the first column is fixed on scroll the column vibrates slightly but visibly (especially on mobile devises. I have no idea why that is. I think it might be to some random ...
Mxngls's user avatar
  • 524
1 vote
2 answers
46 views

Gather td element in one container element

start code <table style="width:100%"> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <...
Otmane Khouna's user avatar
2 votes
1 answer
817 views

table-layout: fixed; not working when text overflows a cell

The following table should have all columns sized by the given widths in pixels: table { border-collapse: collapse; table-layout: fixed; } td { border: 1px solid black; overflow: hidden; }...
Busti's user avatar
  • 5,592
0 votes
2 answers
211 views

How to set table cells to the same with all

I have created a table, where the <tr> are in display: table-cell, the problem is that I dont know how to make them grow all equaly. I need to make my table like this, because this table its ...
Gonçalo Bastos's user avatar
1 vote
2 answers
54 views

Equal width and intrinsic width tables

All the tables in my app are designed to be the size of their content. When there are multiple tables on a page, because they are a different width the lack of alignment looks bad. I want to have the ...
Ollie Williams's user avatar
0 votes
1 answer
620 views

Creating a nested table that overlaps rows and columns of its parent table in HTML

I want to create a table like one of the following: The Table I want: https://i.sstatic.net/RJp4U.png And I have used the following Code here: <body> <table id="tab1"> ...
M.Riyan's user avatar
  • 214
1 vote
1 answer
853 views

HTML Table Static Header and Footer, Fixed height, No Resizing on TR

I have a table in HTML that requires a fixed height. It has Static headers and footers. The table is in a div that has a set height and is scrollable. My table height is set at 100%. The issue that I ...
Jam's user avatar
  • 13
1 vote
1 answer
626 views

Weird space between td and its border element : CSS tables

I am trying to create a CSS table with border all over using the standard method of applying top and left borders to all td elements (apart from those in first column and first row). And then there is ...
Sarvjot's user avatar
  • 33
0 votes
2 answers
2k views

Scrollable Table Body With Fixed Header Columns Not Aligning

After looking different posts from Stack-overflow I did the table with fixed header and scrollable body but in all the posts people gave solution that had tables with fixed width columns where every ...
Saalim Shadman's user avatar
0 votes
1 answer
1k views

Table not displaying as expected

Why am I getting this kind of display when trying on add line to my table ? What I am trying to get is having the second Testssssssssss below the Commande column as expected. Below is my code: ...
Anis's user avatar
  • 21
0 votes
3 answers
476 views

Two rows of a table with different number of cells, but equal width?

I am trying to make a table with two rows. Each row has a different number of cells. Each cell on both rows should be equal in width, and each row should be equal width as well. Hopefully I've ...
user avatar
0 votes
1 answer
421 views

How to make odd and even background visible on print?

How expert like you would you code an odd & even's tr background to be visible for print. I tried without success to !important them in @media print @media print { table > tr:nth-...
JeanCharles Amey's user avatar
0 votes
2 answers
165 views

JavaScript, td size always change

I am writing a simple program that includes table and td's. In the program when you press q the number one appears in a td. but when it happens the td width suddenly change. so my question is how to ...
tal's user avatar
  • 19
0 votes
1 answer
359 views

Why is nested table rendering outside of parent table?

I'm trying to create a table layout with a nested table. I cannot figure out why the nested table is rendering outside of the parent table? Here's the CodePen link: https://codepen.io/specificporpoise/...
Angela B.'s user avatar
0 votes
3 answers
190 views

Table data css for dropdown & adress input

I'm using this CSS in a table. 1)Background color vanishes in address & dropdown. What's the solution. 2)I also want address and dropdown to fill the full table width. I'm not getting which tag I ...
Subhadeep's user avatar
0 votes
1 answer
353 views

Why does responsive table is not working as expected?

I'm trying to make a table responsive, but it's not working as I expect. <figure class="i_table"><table><tbody><tr><td>Title-1</td><td>Title-2</...
user3137451's user avatar
0 votes
1 answer
595 views

Column width changes in HTML table if the table only has a single row

I have a 1D array of objects. I need to display data from that array in a table with 3 columns. I assign 1/3rd of 100% width for each column, since number of columns is fixed. If I have 3 or more ...
Amruta's user avatar
  • 1,545
0 votes
2 answers
1k views

How an I change the color of a specific table cell when hovering on its row? [closed]

I'm trying to make my table data change color upon hovering over a table row. Is that possible? I tried searching everywhere, but none seems to match my description. I want to only change the color of ...
Its Fragilis's user avatar
0 votes
1 answer
75 views

No padding or margin: what's keeping my table from getting 100% width? & why do scrollbars not scroll with wheel when hovering over scrollable el.?

I pretty much just want to set a max-height on a tbody and change the overflow-y to auto so I have a static header and scrollable body. Like this maybe: table { display: block; ...
bsap's user avatar
  • 56
0 votes
1 answer
84 views

How do I make a background image span across each table row and be dynamically resizable with HTML and/or CSS?

I have the following code but it makes the table appear like this when resizing. How can I make each row have a background image that is resized properly as the browser window is resized? <style ...
Ethan Allen's user avatar
  • 14.8k
6 votes
7 answers
2k views

Table TD (rowspan) content hidden with TR visibility set to "collapse"

I have built an HTML table which intermediate rows are hidden with CSS using visibility:collapse Only the first and last rows of the table are visible by default. In this table, there is a column on ...
Vincent's user avatar
  • 1,732
1 vote
1 answer
122 views

TABLE WITH CUSTOMISED BORDER

I am trying to add customised borders to a table with the columns set by bootstrap. The aim is to have the table like in the sketch attached. Each row should have spacing between the top/bottom row ...
R-G's user avatar
  • 125
10 votes
1 answer
3k views

Sticky table header inside overflow-x div with 100% width

I just can’t get a sticky table header inside an overflow-x: auto div to work. The goal is to have a table with many columns that is contained within the div (100% div) yet be able to scroll the ...
bretonics's user avatar
  • 393
0 votes
1 answer
648 views

html table colspan rowspan Piet Mondrian

I am trying to build an html-table-like-version of Piet Mondrian's famous photo: I've succeeded (I think) with the rowspan and colspan stuff, but the width and height seems to be not quite as the ...
natushka's user avatar
2 votes
3 answers
6k views

How to break after n characters with CSS?

I need to break my table cell every 20 characters. I found out, that there is a ch unit in CSS that allows me to limit my max-width like this: td { max-width: 20ch; } Doing this limits the width ...
ˈvɔlə's user avatar
  • 10.2k
0 votes
1 answer
1k views

How to convert a single table row to two columns?

I have a <table></table> that displays items in a single row. I want the items to display as two columns, one column with the first three items and the other one with the last two items. ...
clg's user avatar
  • 25
1 vote
1 answer
1k views

How to get DIV Table headers and footers to repeat when the Div Table is broken by a page-break when printing

I'm trying to replace a normal html table using DIVs. However, it isn't behaving as I'd expect when the table is split with a page-break when printed or rendered to a PDF. I'd assume that it would ...
alj's user avatar
  • 3,039
1 vote
2 answers
490 views

CSS: Changing color on text in specifc column - but not on that column header?

I have the following HTML table: <div class="table"> <table id="carTable"> <tbody> <tr> <th>Car Number<...
java12399900's user avatar
  • 1,591
4 votes
4 answers
3k views

Scrollable table with rounded corners

I have made a table which scrolls vertically when there is too many rows. This can be seen here https://jsfiddle.net/hp5je3ko/1/. However, I would like to add a border radius to the table. As you can ...
Jack P's user avatar
  • 479
-1 votes
1 answer
285 views

How to CSS my table so that the most right column stuck to the right, with variable width

I have a 100% width table of which I want the right most column (D) to take only the minimum required width, but still stuck to the right with the other columns (B, C) fill up the rest of the space. (...
Kriem's user avatar
  • 8,705
0 votes
5 answers
187 views

HTML/CSS table in table styling

I've a table in the last cell in the last row of an other table. The styling should be with rounded corners. The "outer" table looks good, but the "inner" table has rounded cell-corners in every row -...
uwe85's user avatar
  • 31
2 votes
2 answers
3k views

Show text vertically and counter-clockwise in any table cells

I have the following CSS and table with choice 3 and choice 4 vertically displayed but clockwise. I would like to show choice 3 and choice 4 vertically and counter-clockwise. I am not able to find ...
curious1's user avatar
  • 14.7k
0 votes
4 answers
211 views

Making non identical table rows (table within table within table)

I am having a problem creating a non-identical row to the one above it. I want one row with 3 cells, and below that one row that spreads to the end of the row, and so on so on. First row - 3 cells, ...
Roi's user avatar
  • 97
3 votes
1 answer
1k views

CSS table with fixed column widths and max height

I'm trying to create a table with fixed column widths, and also a fixed maximum height, which scrolls beyond the maximum height. Reading around, I would use table-layout:fixed and specify the column ...
Chris Jones's user avatar
2 votes
3 answers
1k views

Break Table Cell Content when max-width is reached

I have a HTML table like this: div { width: 100%; overflow-x: auto; } table { white-space: nowrap; } td { border: 1px solid gray; padding: 5px 10px; min-width: 100px;...
Koopakiller's user avatar
  • 2,883
7 votes
1 answer
13k views

How to set table caption at the top of a table?

I was trying to set calendar in table structure but I don't know how to set caption at the top of the table. Also I can't change the table structure. I want it to look like below: ....
Dharmesh Vekariya's user avatar
1 vote
2 answers
899 views

HTML embed table into a table row (using div tables)

What I'm trying to do: Notice there is an embedded table under that is in the place of the new row. The idea is this would be a dropdown for a single row, upon dropping down, it would reveal a ...
Alexander Gonzalez's user avatar
1 vote
2 answers
2k views

Center text in an HTML table across group of cells

I would like to, once having an HTML table, be able to take a group of cells and write a text (in this case, a single character) centered both vertically and horizontally across that group of cells, ...
dsesto's user avatar
  • 8,178
2 votes
0 answers
1k views

How to achieve text-overflow: ellipsis in a HTML Table with flexible columns

I've spent the last couple of days trying to solve what feels like should be an incredibly common problem with html tables. Here is a codepen which hopefully illustrates the last problem I am trying ...
fredmoon's user avatar