CSS Styling on Buttons

CSS Styling on Buttons

dyetubedyetube Posts: 20Questions: 5Answers: 0

Is it possible to apply CSS stylings on buttons from either my own stylesheet or DataTables stylesheet so it doesn't just look like a link but can be a button?

This question has an accepted answers - jump to answer

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    edited October 2015 Answer ✓

    Sure you can, Just create some CSS classes and set them as the CSS style via the className setting.

    Here is the code for my buttons, I styled them and moved them to a separate location, thats code for copy, print, pdf, csv, excel, collection, selectAll, selectNone and some custom ones to perform actions on the selected rows (Delete Selected and View Timeline (just a redirect))

    Here are some screenshots:

    P.S. You can perform all of those actions inside of the DT initialization as well, Heres a quick example I typed up for ya

  • allanallan Posts: 62,296Questions: 1Answers: 10,214 Site admin

    Ooo - that second one is really cool. Nice styling!

    Allan

  • dyetubedyetube Posts: 20Questions: 5Answers: 0

    That's perfect. Really like what you did! Thanks!

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Haha, thanks! I was skeptical at first i could style the DT buttons that well at first

This discussion has been closed.