Problem to round edges of an html table with css

0

I can not round the edges of an html table, I just want to round the two upper edges but it's impossible for me.

This is what I am using:

.ejemplo {
  border: 1px solid #a7a7a7;
  border-radius: 5px 5px 0px 0px;
  -moz-border-radius: 5px 5px 0px 0px;
  -webkit-border-radius: 5px 5px 0px 0px;
}
<table class="ejemplo">
  <tr>
    <td>
      Prueba
    </td>
  </tr>
  <tr>
    <td>
      Prueba
    </td>
  </tr>
</table>
    
asked by jorge 16.11.2018 в 15:50
source

1 answer

1

I think your problem is with the default classes that the element brings. You could try adding! important at the end of each style. something like this:

.ejemplo{
  border: 1px solid #a7a7a7 !important;
  border-radius: 5px 5px 0px 0px !important;
  -moz-border-radius: 5px 5px 0px 0px !important;
  -webkit-border-radius: 5px 5px 0px 0px !important;
}
    
answered by 16.11.2018 в 15:58