karamilewski Posted March 31, 2022 Share Posted March 31, 2022 Site URL: https://panacherentals.squarespace.com Hi, my client would like the floating "Contact Us" button to have a little mail icon. I figured out the coding for the button but would love help adding an svg icon to it. They sent me the website below as an example. https://www.parisforrent.com/ Link to comment
tuanphan Posted March 31, 2022 Share Posted March 31, 2022 First, edit your HTML code to this <div id="book-me"> <a href="/contact"><svg class="olark-envelope-icon" width="32" height="32" viewBox="0 0 32 32" aria-hidden="true" focusable="false" role="img" fill="none"><rect x="3" y="7" width="26" height="18" rx="2" stroke="currentcolor" stroke-width="2" stroke-linejoin="round"></rect><path d="M7 11L16 17L25 11" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg> Contact Us! </a> </div> Next, edit your CSS code to this #book-me { position: fixed; top: 50%; left: 85%; transform: none; transform-origin: 100% 0; z-index: 99999; } #book-me a { background: #7f99c8; color: #fff; font-size: 14px; font-weight: bold; text-transform: uppercase; font-family: montserrat; padding: 17px 33px; border-radius: 25px; display: flex; align-items: center; } #book-me svg { margin-right: 5px; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
karamilewski Posted April 4, 2022 Author Share Posted April 4, 2022 Thank you so so much!! @tuanphan Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment