Designing exquisite button navigation

Hey everyone, I'm currently working on creating a circular button navigation for my website. I want to have 4 buttons, each with a different color, and I want them to glow when the user hovers over them. So far, this is what I have in my HTML:

HTML:

<nav id="main-menu">
  <ul>
    <li class="model-icon a-color hvr-glow">

    </li>
    <li  class="model-icon b-color hvr-glow">

    </li>
    <li  class="model-icon c-color hvr-glow">

    </li>
    <li  class="model-icon d-color hvr-glow">

    </li>
  </ul>
</nav>

#main-menu  > ul > li {
    margin: 0 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.a-color {
    background-color: Yellow;
}

.b-color {
    background-color: Red;
}

.c-color {
    background-color: White;
}

.d-color {
    background-color: Green;
}

Currently, I'm facing an issue where there is no glow effect and the buttons are appearing as square boxes instead of circles.

Once I figure this out, I plan to add SVG images in the center of each button using this site

But for now, I'm focused on getting the buttons to transform into circles and glow when hovered over.

Thank you!

Answer №1

insert the following code:

#main-menu  > ul > li:hover {}
and make adjustments to the shadows here

also, don't forget the circle:

set the border radius to 50%;

#main-menu  > ul > li {
    margin: 0 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    
}
#main-menu  > ul > li:hover {
-webkit-box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.75);
box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.75);
border-radius:50%;
}

.a-color {
    background-color: Yellow;
}

.b-color {
    background-color: Red;
}

.c-color {
    background-color: White;
}

.d-color {
    background-color: Green;
}
<nav id="main-menu">
  <ul>
    <li class="model-icon a-color">

    </li>
    <li  class="model-icon b-color">

    </li>
    <li  class="model-icon c-color">

    </li>
    <li  class="model-icon d-color">

    </li>
  </ul>
</nav>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Creating customizable Isotope objects using custom CSS margins that are influenced by the child-nth selector and JavaScript

My recent project involved creating a simple .isotope gallery, and when viewing the selected #portfolio-wrap container in Chrome Dev Tools, here is how it appears: Unfortunately, I am unable to upload three links here. Please visit this link for more info ...

Issue with HTML not being displayed during Eclipse Eclipse html not showing up on

This is an example of a servlet: package userInterface; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servle ...

I would like to use a tabset row to showcase buttons in Angular 2

I need to arrange a tabset and buttons in a single row. The tabset is already displayed, now I just need to add the buttons. <div class="form-group col-sm-8 "> <div class="col-lg-8" style="margin-top:35px;" > <h6 class="text-rig ...

Selecting the first li element using JQuery selectors

Can anyone help me with creating an onclick event that triggers when the user clicks on the first list item which is labeled as "Any Date"? I am looking to use jQuery to target this specific element. <ul id="ui-id-1" class="ui-menu ui-widget ui-widge ...

Improving ASP.NET MVC 4 output by bundling whitespace and formatting

While not a critical issue, I find it quite bothersome that when using the bundling feature in ASP.NET MVC 4, there is minimal white space in the output. For example: If manually rendered: <head> <title>Example page</title> < ...

Navigating a mobile-friendly menu anytime!

I'm in the process of creating a responsive "hamburger" menu for mobile devices. The HTML code I have implemented is as follows... .menu_closed { color: red; } .menu_open { color: blue; } <script src="https://ajax.googleapis.com/ajax/libs/jq ...

Adapting CSS according to input selection

Forgive me for asking what may seem like a simple question. I am currently using the CSS code below to modify the background color of a label when its associated checkbox is checked: #project input[id="button1"]:checked + label {background-color:red;} Is ...

Is there a way to access an HTML element using Vue's methods?

Here is an example of my Vue component structure: <template> ... </template> <script> export default { methods: { buildDescription () { if (!this.description) { const div = document.createEl ...

Concealed scrollbar only visible upon resizing the page

For my personal project, I was in need of a custom scrollbar plugin with basic inertia effects and custom images. After some research, I decided to go with mCustomScrollbar. The documentation provided was quite clear, and implementing the script was troub ...

What is the best way to implement an AppBar that fades in and out when scrolling within a div?

I'm trying to implement a Scrollable AppBar that hides on scroll down and reappears when scrolling up. Check out this image for reference To achieve this functionality, I am following the guidelines provided by Material-UI documentation export defa ...

Vue JS: Extracting both the unique ID and value from an array of input simultaneously

I am new to Vue and currently exploring its capabilities. I am experimenting with the Element UI for Vue's user interface. Specifically, I am working with the Input Number Component, to manage an array of data. Let's assume my data is structured ...

JavaScript: Retrieving the following element from the parent container

Is there a way to prevent the next element within the parent tag from being enabled or disabled based on a certain condition? HTML: <span> <input type="checkbox" onchange="toggleInput(this)"> </span> <input type="text" ...

Iframe Loading at Lightning Speed

I have set up a script to load my iframe, but I noticed that the script loads the iframe content too quickly. Is there a way for me to configure it to preload all CSS images and content in the background before showing the full iframe content? Here is my ...

How can I prevent the jQuery animation from moving elements by adjusting the border?

I've been working on a small jQuery script that animates the border of images when hovered over. However, I've run into an issue with unwanted repositioning of adjacent images due to the border width increase. $(document).ready(function(e) { ...

Unable to showcase Mysql search outcomes in a distinct div section

I have been working on a project to showcase MySQL results by utilizing three different sections/divisions. In Division 1, there are radio buttons that allow for selecting and viewing the results based on different criteria. Division 2 contains text indica ...

The functionality of the Angular ng-bind-html directive may be unreliable in specific scenarios

I've exhausted all the solutions found on stack overflow but still haven't found a solution. Using angular 1.4.4 and ng-repeat directive, I am attempting to display a HTML comment inside a table row. A sample comment looks like 'Test commen ...

What is the secret behind Redactor JS's ability to display properly indented code snippets?

If you take a look at the Redactor JS demo and click on the button to show the HTML source code of the displayed content... ...you will notice that the code is properly indented: Most rich text editors or wysiwyg editors typically display code in a singl ...

Having issues with referencing external JavaScript and CSS files in Angular 6

Dealing with an angular6 project and a bootstrap admin dashboard template, I'm facing issues importing the external js references into my Angular application. Looking for guidance on how to properly import and refer to external Js/CSS files in an angu ...

The JavaScript code that functions properly in Codepen is not functioning on my HTML page

Can you help me understand why this code is working fine in CodePen, but not on my HTML page? I'm unable to identify the error that may have occurred. Any assistance would be greatly appreciated! I suspect there's an issue with connecting some jQ ...

Explore relevant Pill information dynamically based on the image that was clicked in Angular

In this particular situation: Using Angular 1.7.2 Utilizing Bootstrap 3 Encountering some challenges after the user interacts with the image: Current Behavior: Upon clicking any image, a modal window appears displaying relevant content. If image 1 is ...