Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda