Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
Is the JS modifying the css of the table?

I have this project: https://jsfiddle.net/5buqm78c/ The problem is that when I apply the filters, the table is show with the incorrect css style. I have set the table min-with to 100%, but when apply the filter (search button), it seems that the table auto adjusts the width of the columns itself to match the content of the column, and does not span 100%. I don't know if it is because the JS code or the css.

.calendar-table {
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 100% !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    table-layout: fixed !important;
}

Thanks for the help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When you're displaying the table you're using display: block, rather than display: table. This means it's behaving like a block element when it's being shown.

Change this:

if (htmlShow.style.display === "none") {
  htmlShow.style.display = "block";
} else {
  htmlShow.style.display = "block";
}

to this:

if (htmlShow.style.display === "none") {
  htmlShow.style.display = "table";
} else {
  htmlShow.style.display = "table";
}

https://jsfiddle.net/WizardCoder/gnjcskpm/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!