Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBTable Font Size

jrush13 free asked 5 years ago


Is there a way to make the font bigger on the table items when using MDBDataTable. I tried overwriting styles and updating the css but I may not be targeting the right properties. Any ideas?


רוית נגר free answered 1 year ago


Piotr Glejzer solution only help with th,

in order to increase font-size for td I need to add this:

entries={10} responsive bordered data={data} noBottomColumns={true} hover className="mdb-table"/>

with this css: mdb-table td{ font-size: 16px; }


Piotr Glejzer staff answered 5 years ago


Hello,

Yes, you can write your own classes and change styles with them.

  <MDBDataTable
          striped
          bordered
          hover
          entriesOptions={[5, 20, 25]}
          entries={5}
          pagesAmount={4}
          data={new data()}
          className='your-custom-styles'
        />

Imported css fille to your js file :

.your-custom-styles tbody tr td {
  font-size: 20px;
  color: blueviolet;
}

enter image description here



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.23.1
  • Device: Mac
  • Browser: Safari
  • OS: n/a
  • Provided sample code: No
  • Provided link: No