How to resize buttons and button text?
How to resize buttons and button text?
I would like to do some styling, css preferred, of the buttons. I've looked around on the forums, added different css to dt-buttons but no success. Is it possible to use classname to resize the buttons and make the text smaller? Can someone show me an example?
Answers
Are you doing it using an event to make sure that you apply your CSS to something that already exists in the DOM?
Here is an example in which I extend the size of the search field and remove a button.
And this is how you dynamically add a class (or css) to a container:
https://editor.datatables.net/reference/api/node()
And yes, you can use classname.
No I'm not using an event. I would just like to make the buttons and text smaller when they are loaded. I am able to use css to style the info, filter, paginations, etc but I'm lost on the buttons.
Ok, but in order to achieve this I think you need to use an event. Why don't you give it a try?
I'm also using Bootstrap4. Here is an example for the info ...
Can I do something similar with the buttons?
Don't know. All I can tell you is that you can apply css to the buttons using my example above that contains buttons().nodes().
Looks like you are not considering to follow this advice. Sorry, but then other people will need to help you.
This example shows how to add a class to a button. Look at the CSS tab to see how to override the default button styles. You can apply the appropriate styles for your needs.
Kevin
I got it now. I just created a btn-sm-menu css and applied it to the buttons using className.
Sorry rf1234, your example is fine but that is not what I was looking for. I did the following as Kevin suggested. This is what I was looking for.
And the css...
Thanks again Kevin.
@th3t1ck could you please share some example link please i was new .
@maddymathan I posted an example and th3t1ck posted the code snippets. Is there something specific you need to see or have questions about what to do?
Kevin
@maddymathan I see you're asking about Editor, but our accounts aren't showing that you have a license or a trial. Is the license registered to another email address? Please can let us know so we can update our records and provide support.
Thanks,
Colin