- This topic has 11 replies, 3 voices, and was last updated 5 years, 9 months ago by
Leo.
-
AuthorPosts
-
June 21, 2020 at 6:45 am #1336194
hemant
I’m looking for this effect :
1. On the desktop two sticky buttons side by side above the header : one displaying our phone number and another displaying a call to action(Download now)2. On the mobile two sticky buttons above the header : one with a Call Us CTA linking to the phone dialer and and another with a “Download now” CTA
What will be the easiest way to achieve this?
June 21, 2020 at 7:34 am #1336226hemant
Also how does one make the secondary navigation stick??
June 21, 2020 at 6:08 pm #1336789Tom
Lead DeveloperLead DeveloperHi there,
Let’s do one thing at a time.
So are both of these buttons basically identical on desktop/mobile?
If so, I would:
1. Add an HTML widget to the Top Bar widget area.
2. As the HTML, do this:<a href="tel:123-456-7890" class="button phone-button">123-456-7890</a> <a href="#something" class="button download-buttin">Download now</a>3. Go into Customize > Layout > Top Bar and set the alignment to center.
June 22, 2020 at 5:14 am #1337272hemant
1. One of the buttons will work differently on mobile and desktop. On the mobile, the first button will link to the dialer. But on the desktop, it will display the phone number.
The second button will link to the same page.
2. The word “buttin” in the second line of code actually means button?
3. Can the buttons in the top bar be separated from the center?
June 22, 2020 at 2:23 pm #1337991Tom
Lead DeveloperLead Developer1. So will it still be a button if it’s only displaying a phone number?
tel:does work on desktop as well if people have a calling app on their computer.2. Yes –
buttonis the class.3. Like more space between them? If so, you can do this:
.top-bar .button { margin: 0 10px; }June 22, 2020 at 8:12 pm #1338193hemant
1. I think I will settle for the same buttons on both mobile and desktop.
3. Where do I add this? In additional CSS tab in the customizer?
4. How do I replace the default background color in the top bar? Also only the color of the buttons in the top bar?
5. How to make the top bar stick?
June 23, 2020 at 5:00 am #1338535hemant
Q.4 about background colour I found the answer in the customizer. The button colour also I changed through the customizer. You can ignore the question at least for the time being.
June 23, 2020 at 9:53 am #1339089Tom
Lead DeveloperLead DeveloperGlad you found those options!
Are you still wanting to make it stick?
June 23, 2020 at 10:18 am #1339123hemant
Yes.
June 23, 2020 at 11:09 am #1339198Leo
StaffCustomer SupportTry this CSS:
.top-bar { position: sticky; top: 0; z-index: 99; }June 24, 2020 at 3:45 am #1339964hemant
Exactly what I was looking for. Thank you.
June 24, 2020 at 9:19 am #1340467Leo
StaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.