Cannot add a border-radius to the header of b-table
See original GitHub issueDescribe the bug
I have applied a border-radius: 15px
to my b-table
, but only to bottom corners are rounded. I have the impression that the top corners are covered by the thead
but even if i apply the border-radius
to the thead
it doesn’t change.
Here is my code VueJs code:
<b-col id="reportstab_block">
<b-table :items="reports" :fields="fields" thead-class="thead-block">
</b-table>
</b-col>
</template>
And my Sass stylesheet:
#reportstab_block
.table
box-shadow: 0px 5px 5px $light_blue;
border-radius: 15px;
.thead-block
background-color: $red
tr
th
color: $light
Here is the result:
Expected behavior
Rounded corners on all the corners of the b-table
.
Versions
Libraries:
- BootstrapVue: 2.9.0
- Bootstrap: 4.4.1
- Vue: 2.6.11
Environment:
- OS: Windows
- Browser: Mozilla Firefox
- Version: 74.0.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Table's border-radius does not function as expected
To use border radius I have a border radius of 20px in the table, and then put the border radius on ...
Read more >Table with CSS3 Border Radius - CodePen
table { border-collapse: collapse; border-radius: 1em; overflow: hidden; }. Entry Header 1, Entry Header 2, Entry Header 3, Entry Header 4.
Read more >border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >CSS Rounded Table Corners | UnusedCSS
If you are only rounding the corners of the whole table, a border-radius will get the job done. But if you need to...
Read more >border-radius - CSS-Tricks
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried many combinations and got it worked by doing this:
Thanks for your help 😃
try targeting your background colors to the
<th>
cells, or<tr>
, perhaps?