I found this awesome CSS code and what to use it on my website. But because I have to generate a lot of buttons with PHP I need to write the CSS inline as style="..." for the button. My question now is, how can I convert that to inline CSS?
I already googled for an converter but sadly I didn't find anything.
You could put it at the top of your file surrounded by style tags.
It would then affect just that file given the associated classes were on the elements meant to be affected.
<style>
//css code goes here
</style>
EDIT:
If you specifically want it to be inline and dont want to type it manually then you would either have to find or write a tool that will add run a post process on it. Writing this correctly would be a challenge but Gulp might be your friend.
are you looking for something like this?
<button style="background: blue; color: black; font-size: 15px">Im a button</button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With