I'm using a DataTables plugin for my ASP.NET MVC program. The table displays without any CSS. Why?

I'm using a DataTables plugin for my ASP.NET MVC program. The table displays without any CSS. Why?

jeremyjamesjeremyjames Posts: 3Questions: 1Answers: 0
edited August 2020 in Free community support

Hi all! I've posted this issue onto Stack Overflow. I spent a lot of time typing out and adding pictures of my problem there, so I hope it's ok if I just link you to the question:

https://stackoverflow.com/questions/63256383/im-using-a-datatables-plugin-for-my-asp-net-mvc-program-the-table-displays-wit

Answers

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin

    I've added a reply there.

    Allan

  • jeremyjamesjeremyjames Posts: 3Questions: 1Answers: 0

    Thanks Allan! I've responded to your reply and added an update to the original question. I'll reproduce that here:

    EDIT: Last night I was messing with my included files in the BundleConfig file and switched the dataTables to bootstrap 4 and got a more desirable result:

    As you can see, this is definitely laid out better, and has the desired dimensions, but the colors of the hovered rows and certain text is still off and unappealing.

    Another look at my BundleConfig file:

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    That green color is not a default Datatables styling color. See the basic BS4 example. Start by right clicking on the elements you want to change and use Inspect to find the CSS being applied that you want changed. If you need help with this then a link to your page or a test case replicating the CSS issues is needed for us to help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • jeremyjamesjeremyjames Posts: 3Questions: 1Answers: 0

    Thank Kevin! It definitely seems to be the bootswatch bootstrap theme I have that is causing the strange colors. I'm pinpointing the CSS and making tweaks now.

    Thank you!

This discussion has been closed.