I have a lot of landing pages that I want to be really, really integrated with my website, to the point that visitors don’t think they’ve headed off my site when they visit them. Particularly, I want the site header to look and behave the exact same way whether these pages are on kinvey.com or Unbounce.
If you look at www.kinvey.com you’ll notice I have a few drop downs for secondary navigation in my header. Today I discovered it’s pretty easy to replicate that that with CSS in Unbounce (compare one of my newer pages, e.g. http://go.kinvey.com/cognitive-computing-insurance-webinar-recording/). I didn’t see anything in the knowledge base about it, so I figured I’d post it here.
DISCLAIMER: I know enough CSS to get me in trouble but I am not a developer. I’m sure I’ve failed to adhere to all development best practices here. I’m open to suggestions/criticism.
All I had to do was to create a div for each of my menu items and then hide the
element that contained my submenu. For example:
CUSTOMERS Pharma & Healthcare Construction & Manufacturing Energy & Utilities Finance & Insurance Media & Entertainment Retail Other
CSS then makes it really easy to display that
element on hover. Here’s what I used (I also added some animated transitions):
/* this section displays the dropdown menu and defines the dropdown styles */
@-webkit-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; } }
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; } }
.dropdown {
position: relative;
display: inline-block; }
.dropdown:hover .dropdown-content {
display: block !important;
-webkit-animation-delay: 0.5s;
animation-delay: 0.5s
-webkit-animation: fadeIn 0.5s;
animation: fadeIn 0.5s; }
I put this, along with the rest of the CSS I use to style my menu (to be honest, that was the hard part), in the script manager so I don’t have to worry about adding it to each page.
Anyways, pretty simple stuff but maybe this will help point someone in the right direction. Happy lead hunting!