Home > database >  Add a background to a material icon
Add a background to a material icon

Time:12-24

I have the following material Icon code. However, I would like to add the white background to give it more contras. Any ideas how to add the background?

<a id="lnk_quick_print" href="javascript:;" title="Quick Print" onclick="window.print();"  style="font-size:14px;margin-left: 8px;">print</a>

Two Icon examples. Would like to implement #2

CodePudding user response:

What do you think about this:

<a id="lnk_quick_print" href="javascript:;" title="Quick Print" onclick="window.print();"  style="background: white; padding: 5px 10px; box-shadow: 0 0 10px rgba(0,0,0,0.4); border-radius: 10px; font-size:14px;margin-left: 8px;">print</a>

CodePudding user response:

Use this

<a id="lnk_quick_print" href="javascript:;" title="Quick Print" onclick="window.print();"  style="font-size:24px;margin-left: 8px;background:white;padding:5px 6px">print</a>
  • Related