What is the best way to resize my hamburger menu and achieve a flawlessly circular border for it?

I've been struggling to reduce the size of my hamburger menu (both height and width) for some time now. I managed to make it a bit smaller, but I can't seem to figure out how to shrink it further. Additionally, I'm having trouble creating a perfect circle border around it. Can someone please assist me? I modified the code from a codepen but I just can't get it right.

Check out my jsfiddle here: https://jsfiddle.net/annahisenberg/ft10ersb/6/

Here is the JS Code snippet:

class Drag extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      x: this.props.x,
      y: this.props.y,
      showMoreOptionsPopup: false,
      showHelpModal: false
    };

    this.reff = React.createRef();

    this.dragMouseDown = this.dragMouseDown.bind(this);
    this.elementDrag = this.elementDrag.bind(this);
    this.closeDragElement = this.closeDragElement.bind(this);
    this.showMoreOptionsPopup = this.showMoreOptionsPopup.bind(this);

  }

  // Rest of the JS code goes here...

And here's the CSS snippet:

#more_options_button {
    /* CSS styles for the button */
}

#more_options_button.open div {
    /* Open state styles */
}

/* Additional CSS styles for better appearance */

@keyframes modalFade {
    /* Modal animation keyframes style */
}

.more_options_icons {
    /* Icon styles */
}

.help_icon_ctnr {
    /* Container styles */
}

Answer №1

To achieve the desired size, adjustments must be made to various CSS properties. The styles are currently spread across different rules and involve absolute positioning/margins in a unique manner, making it a bit complex. Nonetheless, I have attempted to create a basic solution here

The main menu div's width needs to be reduced, along with the height of its pseudo elements. Additionally, decreasing their margins and adjusting the position within the div is necessary, followed by adding a border for better visual appeal.

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

Ways to implement a scrollable v-list component using Vuetify

I have set up a v-list using flex layout, where the v-list expands to fill the remaining space horizontally in a column. However, if the list contains many elements with a total height that exceeds the column's height, the list ends up sticking out of ...

Utilize ViewChild to handle changing elements in Angular 2 and Ionic 2 applications

I am facing an issue where I want to dynamically add multiple IonicSlides, but I am unable to use @viewChild. Can anyone suggest a solution for this problem? Template.html : <div *ngFor="let name of title;let i = index;"> <ion-slide ...

Is it possible to configure Webpack/NextJs to handle a recurring import path mapping?

Exploring ways to streamline imports in my NextJs Project (v14.1.3), I'm interested in finding a method to modify the import statement below: import foo from 'path/to/foo/foo' To possibly simplify it to: import foo from 'path/to/foo&ap ...

Is AJAX the Solution for Parsing XML: A Mystery?

While trying to parse XML data, I am facing an issue where I can't retrieve the image. Can someone assist me with this problem? Here is my code snippet below or you can view it at http://jsfiddle.net/4DejY/1/: HTML <ul data-role="listview" data-f ...

What is the best way to implement automatic scrolling to the bottom of a materialUI drawer in React after a page refresh?

I am facing an issue with my Material UI Drawer, which contains numerous checkboxes and radio buttons for an advanced search page. Whenever a checkbox or radio button is clicked, it triggers an API request to fetch results instantly without requiring a sub ...

HTML and CSS link conflict

As a beginner in CSS, I am experimenting with creating a simple website using HTML and CSS. However, I have encountered an issue where the links on the left side of my page are being interfered with by a paragraph in the middle section. This causes some of ...

Creating an AJAX data form in a JSP scenario

I want to correctly set up the data parameter for the ajax call. <script type="text/javascript"> $(document).ready(function() { $('#call').click(function () { $.ajax({ type: "post", ...

Efficiently managing multiple database updates with PHP and JQuery

Having trouble processing multiple mySQL updates simultaneously? I have 4 select/option boxes fetching data from a db table and I want to update the database onChange using JQuery. It's working with one select module, but adding more causes issues. Th ...

CSS grid is organizing itself neatly on larger screens

I'm currently facing an issue with displaying a CSS grid on my page. When viewed on desktop, the grid appears stacked up instead of in separate columns. I've tried various methods like dividing it into 4 columns and using spans for width but noth ...

Checking the status of an object using a Jasmine spy call in an Ajax method

Currently, I am unit testing an Angular controller that relies on a Rails Resource factory to manage data exchange with a Rails application. Specifically, POST requests are handled by calling a method on the model, like so: $scope.resource.update().then(s ...

Issue with running `npm start` in React after installing React script version 3.4.0

I'm new to React.js and I've been having trouble getting it to work after using npm start. No matter what I try, I can't seem to get it running. Any help would be appreciated. Error [email protected] start C:\xampp\htdocs& ...

What is the most efficient way to retrieve 10,000 pieces of data in a single client-side request without experiencing any lag

Whenever I retrieve more than 10 thousand rows of raw data from the Database in a single GET request, the response takes a significant amount of time to reach the client side. Is there a method to send this data in smaller chunks to the client side? When ...

Leverage CSS to manipulate image attributes

Is it possible to use CSS programmatically to set the attributes of my img tag? <span><img class="img-dollar"></img></span> <span><img class="img-royalty"></img></span> I am looking for a way to specify t ...

Ways to solely cache spa.html using networkfirst or ways to set up offline mode with server-side rendering (SSR)

I am facing an issue with my application that has server-side rendering. It seems like the page always displays correctly when there is an internet connection. However, I am unsure how to make Workbox serve spa.html only when there is no network available. ...

Tips for handling two JSON array objects with JavaScript

This particular function public function groups_priviledges($user_id = NULL){ $data['groups'] = $this->priviledges_model->admin_groups(); $data['member'] = $this->priviledges_model->empAdminGroup($user_id); echo ...

Real-time Updating of ChartJS Charts in Rails Using AJAX

I am currently working with Rails 5 and the latest version of ChartJS library (http://www.chartjs.org/docs/). My goal is to retrieve the most recent 20 items from the SensorReading model and update the Chart using setInterval and AJAX. I have successfull ...

What causes the height and width properties in a div to remain unchanged even after using the zoom/scale CSS?

I'm trying to center a CSS spinner on the page, but I am struggling with making it happen. Even when scaled down by 50%, the height and width remain at 200px. <div class="center" style=""> <div class="uil-default-css" style="width: 200px ...

Tablet displaying incomplete background image

I am facing an issue with my background image only showing inside the content blocks, as you can see in the screenshot. I have a small fadeIn animation for the content, but nothing else special. Here is the CSS code I am using: .template_home { backgro ...

Tips for recognizing hyperlinks within a block of text and converting them to clickable links in Angular 2

My task is to create clickable links within a paragraph of strings. I tried using a custom pipe, but seem to be missing something essential. Here's my attempt: import { Pipe, PipeTransform } from '@angular/core'; import { DecimalPipe ...

Having difficulties setting up React JS on my Windows X64 operating system

Looking to set up React JS with the npx command...I attempted to install React JS by running these commands...but unfortunately, it doesn't seem to be successfully installing React after reaching the last two lines shown in the image. ...