28106 sujets

CSS et mise en forme, CSS3

bonjours a tous Smiley smile

j'utilise box-shadow: pour donner une ombre à mes tableaux et je trouve que le cadre des tableaux fait trop sombre, donc pour les enlever j'ai fait
(je vous met tout car il doit exister quelque chose de plus simple que je n'ai pas trouver Smiley decu )

.container3,
.container4,
.container5,
.container6,
.container7,
.container2_table td,
.container3_table1 td,
.container3_table2 td,
.container3_table3 td,
.container4_table2 td,
.container5_table td,
.container6_table td,
.container7_table1 td,
.container7_table3 td
{
     border: 1px solid rgb(0, 0, 0); /*- Black -*/
}
.container2_table tr:first-child td,
.container3_table1 tr:first-child td,
.container3_table2 tr:first-child td,
.container3_table3 tr:first-child td,
.container4_table2 tr:first-child td,
.container5_table tr:first-child td,
.container6_table tr:first-child td,
.container7,
.container7_box,
.container7_table1 tr:first-child td,
.container7_table2,
.container7_table3 tr:first-child td
{
     border-top:none;
}
.container2_table td:first-child,
.container3_table1 td:first-child,
.container3_table2 td:first-child,
.container3_table3 td:first-child,
.container4_table2 td:first-child,
.container5_table td:first-child,
.container6_table td:first-child,
.container7_table1 td:first-child,
.container7_table2 td:first-child
{
     border-left:none;
} 
.container2_table td:last-child,
.container3_table1 td:last-child,
.container3_table2 td:last-child,
.container3_table3 td:last-child,
.container4_table2 td:last-child,
.container5_table td:last-child,
.container6_table td:last-child,
.container7_table1 td:last-child,
.container7_table2 td:last-child
{
     border-right:none;
}  
.container2_table tr:nth-last-child,
.container3_table1 tr:nth-last-child,
.container3_table2 tr:nth-last-child,
.container3_table3 tr:nth-last-child,
.container4_table2 tr:nth-last-child,
.container5_table tr:nth-last-child,
.container6_table,
.container7,
.container7_box,
.container7_table1,
.container7_table2,
.container7_table3 tr:nth-last-child
{
     border-bottom:none;
}   

le problème est border-bottom:none; qui ne fonctionne pas, je pense avoir tout essayé si quelqu'un pouvais m'aider je lui ferait un gros bisou Smiley smile
Modérateur
Salut,

tu as oublié les td pour les sélecteurs du border-bottom. Il n'y a pas de border sur les tr tu l'a bien fait pour le top ca doit être une erreur d'inattention.

btw pourquoi tu ne te simplifie pas la vie avec une classe commune ou meme juste table (si tout tes tableau sont comme ca ?

.nobordertable td {
  border: 1px solid #000;
}
.nobordertable td:first-child {
  border-left:0;
}
.nobordertable td:last-child {
  border-right:0;
}
.nobordertable tr:first-child td {
  border-top:0;
}
.nobordertable tr:last-child td {
  border-bottom:0;
}

https://jsfiddle.net/undless/nda8zt5o/

bonne aprem
Meilleure solution