question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

table header columns and body columns aren't aligning properly to each other

See original GitHub issue

I am facing this weird issue, when I load table data as mentioned columns are not in line with each other basically my th style is text-align: left; width: 0px; max-width: 0px; which is not aligning with tr’s in tbody when I resize window it aligns properly! now my th style is like this text-align: left; width: 212px; max-width: 212px; I am not giving any overriding css.please someone help me out.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sadakmedcommented, Jun 26, 2020

use width and assign to it (100/ the number of column)%

exampli gratia, i have 5 columns:

<BootstrapTable version='4' data={ jobs } cellEdit={ cellEditProp } insertRow={ true }>
          <TableHeaderColumn dataField='id' width='20%' isKey={ true }>Job ID</TableHeaderColumn>
          <TableHeaderColumn dataField='status' width='20%' >Job Status</TableHeaderColumn>
          <TableHeaderColumn dataField='name' width='20%' >Job Name</TableHeaderColumn>
          <TableHeaderColumn dataField='type' width='20%' >Job Type</TableHeaderColumn>
          <TableHeaderColumn dataField='active' width='20%' >Active</TableHeaderColumn>
      </BootstrapTable>

0reactions
PavanKumarRaocommented, Jun 18, 2019

@AllenFang Im facing the same issue.Please revert back

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are these HTML column headers misaligned?
I believe it's faster for large tables to be rendered with dynamic column widths, header/column alignment is then guaranteed, plus the code is ......
Read more >
Header columns do not align to body columns when using ...
When using a Scroller and the table is being (re)drawn while hidden, then the columns of the header do not align with the...
Read more >
Tables in HTML documents
Table cells may either contain "header" information (see the TH element) or "data" (see the TD element). Cells may span multiple rows and...
Read more >
Advanced table settings: column width, alignment and ...
Mostly, tables should be left-aligned because we read left-to-right. However, tables of financial figures should have the columns with numerals ...
Read more >
DataTables - header column width not aligned with body ...
// If table is in the tab, you need to adjust headers when tab becomes visible. // For example, for Bootstrap Tab plugin:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found