dbliss20 Posted November 20, 2020 Posted November 20, 2020 Site URL: https://harp-bullfrog-34ne.squarespace.com Site password is 2021! I used the following code to add another button on the Nav bar <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-actions .header-actions-action.header-actions-action--cta').before('<div class="header-actions-action header-actions-action--cta" id=""> <a class="btn btn--border theme-btn--primary-inverse" href="/join-now" id=""> Book Demo </a> </div>'); $('.header--menu-open .header-menu .header-menu-cta').before('<div class="header-menu-cta " id="" style=" "> <a class="btn btn--border theme-btn--primary-inverse" href="/join-now" id=""> Join Now </a> </div>'); }); </script> How do i style this button (Book Demo) to have a white border and white text, but keep the style for Sign Up button the same as existing (blue color)? Hover style can stay the same.
dbliss20 Posted November 20, 2020 Author Posted November 20, 2020 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-actions .header-actions-action.header-actions-action--cta').before('<div class="header-actions-action header-actions-action--cta" id=""> <a class="btn btn--border theme-btn--primary-inverse" style="color: white; border: 2px solid white;" href="/join-now" id=""> Book Demo </a> </div>'); }); </script> I think this works
Beyondspace Posted November 21, 2020 Posted November 21, 2020 16 hours ago, dbliss20 said: Site URL: https://harp-bullfrog-34ne.squarespace.com Site password is 2021! I used the following code to add another button on the Nav bar <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-actions .header-actions-action.header-actions-action--cta').before('<div class="header-actions-action header-actions-action--cta" id=""> <a class="btn btn--border theme-btn--primary-inverse" href="/join-now" id=""> Book Demo </a> </div>'); $('.header--menu-open .header-menu .header-menu-cta').before('<div class="header-menu-cta " id="" style=" "> <a class="btn btn--border theme-btn--primary-inverse" href="/join-now" id=""> Join Now </a> </div>'); }); </script> How do i style this button (Book Demo) to have a white border and white text, but keep the style for Sign Up button the same as existing (blue color)? Hover style can stay the same. your site is private now, did you resolve issue? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
dbliss20 Posted November 21, 2020 Author Posted November 21, 2020 My site is https://seabass-vuvuzela-ynfj.squarespace.com/ I got the buttons to appear on non-mobile devices. However, on mobile, it doesn't show it. Is there a way i can make it work for mobile?
tuanphan Posted November 22, 2020 Posted November 22, 2020 12 hours ago, dbliss20 said: My site is https://seabass-vuvuzela-ynfj.squarespace.com/ I got the buttons to appear on non-mobile devices. However, on mobile, it doesn't show it. Is there a way i can make it work for mobile? <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-actions .header-actions-action.header-actions-action--cta').before('<div class="header-actions-action header-actions-action--cta" id=""> <a class="btn btn--border theme-btn--primary-inverse" style="color: white; border: 2px solid white;" href="/join-now" id=""> Book Demo </a> </div>'); $('.header-menu-nav a.btn').before('<div class="header-actions-action header-actions-action--cta" id=""> <a class="btn btn--border theme-btn--primary-inverse" style="color: white; border: 2px solid white;" href="/join-now" id=""> Book Demo </a> </div>'); }); </script> <style> @media screen and (max-width:767px) { .header-actions-action.header-actions-action--cta { display: block !important; } .header-actions-action a.btn { color: blue !important; border-color: blue !important; } } </style> 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!)
abcohen1605 Posted July 13, 2021 Posted July 13, 2021 Can I use this button but make it a phone number?
tuanphan Posted July 14, 2021 Posted July 14, 2021 18 hours ago, abcohen1605 said: Can I use this button but make it a phone number? In above code, edit Book Demo to your phone number, eg: 0123.456.789 & edit this line href="/join-now" to href="tel:0123456789" with 0123456789 is your phone number 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!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.