How to turn the last nav menu item in Elementor into a button using CSS

How to turn the last nav menu item in Elementor into a button using CSS

The nav menu item in the Elementor Pro page builder is one of the most important elements. It allows us to build and design custom headers using Elementor. Sometimes it is important to put buttons in website headers as CTA.

Elementor got several header templates with buttons. But the problem is that on the mobile view the button is difficult to manage as it takes up a lot of space and makes the mobile header looks messy. Plus when we change the menu we also need to update the button text and link manually.

But if we can simply turn the last nav menu item in Elementor into a button that will solve the issue. On mobile view, the button will go inside the toggle menu. The button text and menu will also change dynamically as we change the source WordPress menu.

Please check the video below in which I explain clearly how you can turn the last nav menu item in Elementor into a button using some simple CSS codes. The CSS codes are provided below the video.

.my-nav .elementor-nav-menu li:last-of-type .elementor-item {
        color:#fff!important;
       
        text-align: center;
        background-color: #c0392b;
        
        border-radius: 5px;
          }
          
 /*Hover Background color*/         
.my-nav .elementor-nav-menu li:last-of-type .elementor-item:hover{
    
    background-color:#000;
}

/*End of CSS code*/

Speed up or decrease the load time of your Elementor website using the WP Rocket plugin

Recommended WordPress ResourceBenefits of using it
Element PackThis is a useful Elementor addon plugin that adds around 60 addon elements to your Elementor page builder. Useful elements such as the Instagram gallery, table, document viewer, iframe, and much more.
WP EngineReliable WordPress hosting. Super fast, regular automatic backups, built-in CDN for faster content delivery, top-notch security, and more!
Jupiter Multipurpose WordPress theme for ElementorImport among many 450 ready-made websites made with Elementor and customize them according to your needs. Advanced WooCommerce checkout options optimized for better conversions.
WP RocketA magical WordPress plugin that will reduce the load time of your website to less than a second. It is an all-in-one speed optimization tool. It will also improve your Google Page Insights score. As the pages load quicker your website bounce rate will decrease, and average pages on time will increase. Eventually, you will get more traffic.
Slider RevolutionThe most powerful and advanced WordPress slider plugin ever. Over 200+ ready eye candy slider templates to wow your website visitors. Advanced animations, parallax effects, and interactive features.
Duplicator ProThis plugin will save you from disaster. It keeps regular backups of your WordPress sites. In case you break your site you can easily recover it. Using this plugin you can also easily migrate your WordPress sites. It can also keep cloud backups such as Dropbox, Google Drive, One Drive, etc.
ThemeforestBuy any type of beautiful WordPress theme from here such as blogging, WooCommerce, Real Estate, etc. Ability to import any demo site. Chose any type of page builder such as Elementor, WP Bakery, Muffin builder, etc.
𝗘𝗻𝘃𝗶𝗿𝗮 𝗚𝗮𝗹𝗹𝗲𝗿𝘆Best WordPress image and video gallery plugin. Easy to use with powerful and advanced features. If your WordPress page builder does not have a good enough gallery element then check this one out!
– Completely responsive on mobile
– Social Media Integration
– Slideshow & Fullscreen
– Drag & Drop Builder
Ithemes Security ProIt is a powerful WordPress security plugin. It will protect your website from bots trying to hack into your site through a brute force attack. It can also scan your website and remove malware.
Getty ImagesGet premium stock images from here. Using high-quality and premium stock images on your site will make your site look professional. Visitors will be impressed and quickly turn into paying customers.
WP FormsOne of the most popular WordPress form plugins ever. Easily build advanced contact, payment, donation, survey, and newsletter forms with zero coding. Embed your forms on posts/pages using a shortcode. Built-in Recaptcha to prevent spam. The information of people submitting the form will be stored as leads directly on the website.
NamecheapBuy any type of domain name at a very low price. The renewal rates are also reasonable. I use namecheap domain names on all of my websites.

India $1295