responsive table dont use all the width in pc


Topic: responsive table dont use all the width in pc

Diego Canales pro asked 6 years ago

Hi! I have a responsible table with the next code according to the documentation.
    <table mdbTable striped="true" responsive="true">
With these the table works fine in my phone, but in my pc don't use all the width. I was inspected the css in chrome tools and found that problem is.
display: block;

to solve this i added the next css code
.table-responsive {

    display: table;

}

@media screen and (max-width: 667px) {

    .table-responsive {

        display: block;

    }

}

and works but i think is not the best approach, i will be appreciated if someone can let me know a best approach

Damian Gemza staff answered 6 years ago

Dear Diego Canales, Yes, your approach is not the best one. Please add d-block and d-md-table classes to the table element, and your problem should be gone. Please check my below code:
<table mdbTable responsive="true" class="d-block d-md-table"></table>
Best Regards, Damian
Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: pc
  • Browser: chrome
  • OS: linux
  • Provided sample code: Yes
  • Provided link: No