Having difficulty eliminating the gap between the step connector and StepIcon component within the material-ui stepper

I am having trouble removing the space between the step and connector in my code. Despite trying various methods, I have not been successful.

Currently, there is a default space between the step icon and connector, but I want to eliminate this space entirely.

Even after attempting to adjust margins and styles, I have been unable to remove the space between the connector and step icon.

Below is a snippet of my code:


// Your code goes here
 // Your code goes here 

Answer №1

To adjust the spacing between connector and icon, you will need to customize the alternativeLabel property in the StepConnector component. One way to achieve this is by creating a new customized version of the StepConnector, for example, named CustomizedConnector. Here's an example code snippet to illustrate how you can do this:

const CustomizedConnector = withStyles({
  // Adjust this attribute to change the gap spacing
  alternativeLabel: {
    top: 10,
    left: "calc(-50% + 7px)",
    right: "calc(50% + 7px)"
  },
  
   /* Add any other style attributes as needed */
})(StepConnector);

You can find a live demo of this customization in action on this sandbox.

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

Is it possible to shift the div inline-block using the CSS :after selector?

I'm looking to adjust the placement of the disk icon so that it aligns more with the baseline of the text without increasing the vertical space between lines. Below is the CSS code I've worked on so far: .openPage:after { content: ' &a ...

Vertically aligning collapsing menus in the center

As I continue to learn about HTML, CSS, and jQuery in order to enhance my personal website, I have encountered some challenges along the way. Thankfully, the support from individuals like yourself has been invaluable. Thank you! Below is the current code ...

Having trouble running the npm script due to a multitude of errors popping up

I have encountered an issue while trying to run an npm script. I added the script in the `package.json` file multiple times, but it keeps showing errors. I am currently working on building a website and require npm sass for it. However, when I try to run t ...

Issues with using a personalized font in a Stenciljs project

Looking for guidance on implementing a custom font in my Stenciljs app. I have the otf file, unsure if an npm package is necessary. Here's my code: filestructure: -src --components --assets ---Anurti-Regular.tiff ---Anurti-Regular.ttf friends-l ...

Display custom modals in React that showcase content for a brief moment before the page refreshes

I recently developed a custom modal in React. When the Open button is clicked, showModal is set to true and the modal display changes to block. Conversely, clicking the Close button sets the display to none. However, I noticed a bug where upon refreshing ...

Seeking Up/Down Arrows HTML numerical input feature specifically designed for iOS devices

I am having an issue with a number input box on iOS. I am utilizing jquery, kendo mobile, and HTML5 for this particular task. While the number input displays up and down arrows in the Icenium simulator, they are not showing on the iPad. I am seeking a sol ...

Is there a way to prevent text flipping using CSS or jQuery?

Is there a way to prevent the contents of an object from flipping when it is rotated +180°? I want to keep everything inside readable and avoid any flipping effects. ...

What are some techniques for incorporating lazy loading into a div element containing a card?

While exploring different resources, I came across numerous tutorials on implementing lazy loading with images and iframes. But surprisingly, I couldn't find any guide on how to achieve the same effect with a div containing other types of content. Sp ...

Can someone explain why the color of a <select> element in Chrome is being influenced by the CSS property "font-family: inherit"? Here is an example

I've always been curious as to why the <select> element appears in different colors on various web pages. I've noticed that when the font-family:inherit css property affects the select element, it ends up looking blue! <!-- BLACK --> ...

jQuery enigma - struggling to get slideUp/slideDown to function

My goal is to utilize jQuery and CSS to display the initial paragraph out of a set of four, and insert a link or button at the conclusion of the first paragraph. Upon clicking on the link or button, my aim is to reveal the remaining three paragraphs in a s ...

The behavior of CSS classes, unique characters, and the usage of class prefixes

I'm dealing with a template that contains some puzzling CSS selectors. The syntax in question is as follows: .\35 grid .\31 1u { width: 91.5%; }, but the '\' character appears as a strange symbol in Notepad++. Can someone ex ...

When bootstrap is imported, SVG is displayed with a square background

The combination of reactJS and bootstrap has caused an unexpected issue for me. After importing bootstrap, strange squares have started to appear behind my SVG images... https://i.sstatic.net/4vmP8.png Is anyone familiar with what is causing this and ho ...

Minimize all expanded containers in React

Although I've come across similar questions, none of them have addressed mine directly. I managed to create a collapsible div component that expands itself upon click. However, I am looking for a way to make it so that when one div is expanded, all o ...

Adjust the alignment of two headers with varying sizes

Can someone provide guidance on aligning two headers of different sizes (e.g. h3 and h5) based on their bottom edges, making them appear like a cohesive group in a sentence format? The current code snippet I am working with is as follows: ...

WindiCSS classes are not functioning properly within a Nuxt application

I've been encountering some difficulties with WindiCSS. The classes are not being applied to the elements as expected. I attempted to install an older version of Windi, but the issue persisted. I even tried switching to Tailwind instead of Windi, but ...

Issue with Responsive Behavior of Multi-Row Cards in Bootstrap 4

My goal is to create responsive rows of cards with some margin, but I am running into issues. When I use margin:5px; on my cards, the row overflows and they are not centered correctly. There seems to be extra space on the right side of the cards. How can I ...

Is it possible to create this layout using Bootstrap 5? I want to stack spans, with one inside the container and one outside

Trying to achieve a specific design using Bootstrap 5.3. https://i.sstatic.net/STifm.jpg This design should be placed over the showcase, with the following code for the showcase displayed below: <div class="showcase d-flex flex-column"&g ...

"Implement a feature in Material-UI to conceal input fields and set character limits for minimum and maximum

I'm looking to add a text input field and sign up button, with the password entered in the field hidden for security reasons. Any suggestions on how I can achieve this feature? Additionally, I want to restrict the field so that passwords less than 5 ...

Customize Your Form Labels with Bootstrap: Changing Label Color in Forms

I am completely new to using bootstrap, particularly bootstrap 3. The goal I have is to change the color of labels such as "Name", "Email Address", "Phone Number" and "Message" from dark grey to white in the design shown below. https://i.sstatic.net/yDTto ...

I am facing issues with applying my CSS styles to my PHP include files correctly

After facing an issue with my previous post due to unclear information and improper code presentation, I realized that the root cause was not related to a duplicate question. So, here is a new post with detailed information. In my project, I have created ...