Button Configuration in Menu
Buttons within menu items can be configured as follows.
Button Configuration in Menu
<li>
<a class="nav-link btn btn-primary" href="#footer"
>Contact Us <i class="fas fa-arrow-right"></i
></a>
</li>
The button is configured using the <a>
tag, and is set to navigate to #footer
when clicked.
Although the <button>
tag also exists for buttons, this example illustrates using the <a>
tag to configure a button.
It is set to navigate to the #footer
at the bottom of the page on click. Clicking the Contact Us button will take you to that section.
Button Styling
Button Styling
/* Buttons */
.btn {
display: inline-block;
padding: 12px 32px;
border-radius: 30px;
text-transform: uppercase;
font-size: 14px;
transition: 0.3s;
}
.btn-primary {
background: var(--primary-color);
color: #000000;
}
.btn-secondary {
margin: 5px 0;
background-color: var(--bg-secondary);
color: var(--bg-primary);
}
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.