Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is causing border-radius to not work? [duplicate]

Tags:

html

css

I've tested this both in Chrome and in Firefox. I'm attempting to make slight rounded edges on a table of mine, and I don't understand why the border-radius command is not working.

Here's the jfiddle:

http://jsfiddle.net/hz018pLz/

When I use CTRL+SHIFT+I to look at the computed styles, I see that this element has

border-radius: 20px; ticked, but unselecting it makes no change to the display of the table.

What am I not doing that I need to be doing in order for this to work?

Here's the code as well:

#bp-table {
  font-family: Century Gothic, sans-serif;
  font-size: 11px;
  margin: 15px;
  width: 99%;
  max-width: 99%;
  border-radius: 20px;
  border-collapse: collapse;
}
#bp-table th {
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 8px;
  background: rgb(60, 55, 88);
  color: #ffffff;
}
#bp-table td {
  padding: 8px;
  background: #e8edff;
  text-align: left;
  border-bottom: 1px solid #fff;
  border-top: 1px solid transparent;
}
#bp-table tr:hover td {
  background: #f0d3d3;
  color: #1e1e5b;
}
<table id="bp-table">
  <thead>
    <th>A</th>
    <th>B</th>
    <th>C</th>
    <th>D</th>
    <th>E</th>
  </thead>
  <tbody>
    <td>one</td>
    <td>one</td>
    <td>one</td>
    <td>one</td>
    <td>one</td>
  </tbody>
</table>
like image 931
Brian Powell Avatar asked Dec 05 '25 17:12

Brian Powell


1 Answers

The elements inside are still rectangular and full visible so you can change the overflow property to avoid that visual rect :

#bp-table {
  overflow:hidden;
}

Check the UpdatedFiddle

like image 100
DaniP Avatar answered Dec 08 '25 08:12

DaniP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!