Two elements failing to display side by side

Can someone help me figure out how to align the quantity and Add-to-cart button on the same line? The quantity is displaying as a block element even though I set it as inline... any suggestions would be appreciated! Visit this link for reference.

I've attempted to remove any previous !important block CSS, but nothing seems to be working. I've also tried all possible inline declarations.

Answer №1

To ensure proper display, enclose the button and product quantity within a div with either a display flex or inline-block property.

Here is an example of how it should be structured :

<div class="flex">
  <div class="quantity">
    <label class="screen-reader-text" for="quantity_649c281069093">Irisches Freiland-Huhn mit Gemüse &amp; Kelp-Alge, Adult Menge</label>
    <span class="ui-spinner ui-corner-all ui-widget ui-widget-content" style="height: 40px;"><input type="number" id="quantity_649c281069093" class="input-text qty text ui-spinner-input" name="quantity" value="1" title="Menge" size="4" min="1" max="" step="1" placeholder="" inputmode="numeric" autocomplete="off" aria-valuemin="1" aria-valuenow="1" role="spinbutton">
    <a class="ui-spinner-button ui-corner-br ui-button ui-widget ui-state-default ui-button-text-only ui-spinner-down ui-spinner-up ui-corner-tr ui-button-icon-only" tabindex="-1" role="button" aria-hidden="true"><span class="ui-button-icon ui-icon ui-icon-triangle-1-n"></span><span class="ui-button-icon-space"> </span>
    <span class="ui-icon"><i class="fas fa-plus"></i></span>
    </a>
    <a class="ui-spinner-button ui-corner-tr ui-button ui-widget ui-state-default ui-button-text-only ui-spinner-down ui-corner-br ui-button-icon-only" tabindex="-1" role="button" aria-hidden="true"><span class="ui-button-icon ui-icon ui-icon-triangle-1-s"></span><span class="ui-button-icon-space"> </span>
    <span class="ui-icon"><i class="fas fa-minus"></i></span>
    </a>
    </span>
  </div>
  <button type="submit" class="single_add_to_cart_button button alt wp-element-button">In den Warenkorb</button>
</div>

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

Maintaining the layout of two columns in Bootstrap 4, responsive design turns them into a single stacked

Currently using Bootstrap v4 with a two-column layout that splits the container in half. On larger screens, the items in each column display correctly. However, on smaller screens, Bootstrap shuffles the items from column 2 into column 1. I am looking to ...

Ways to create a distinct highlight for the selected link in the navigation upon clicking

Similar Inquiry: How can I highlight a link based on the current page? Situation I have been struggling to keep a selected link in my navigation menu highlighted after it has been clicked. Unfortunately, I haven't come across any straightfor ...

Matching Javascript Variables to CSS Styles

I am currently developing a small HTML page and I am utilizing JavaScript to retrieve the screen dimensions. However, I am facing an issue with passing this variable to a CSS style as shown below. How can I achieve this successfully? Additionally, I have ...

What are some creative ways to animate a highlight effect on a CSS

I'm struggling to implement a sliding underline effect for my top navigation bar on hover. I've tried using transitions and keyframes, but so far it's not working as expected. My current attempt only triggers the effect on the parent elemen ...

Mastering the Art of Harnessing External Templates in Meteor Mantra

I have been diving into the Mantra style guide () in order to integrate it with meteor. What confuses me is determining the "right" approach for using external templates with meteor and mantra. Specifically, I'm unsure about handling CSS and JS files. ...

Picture shown in the sidebar

I'm dealing with a table that has only one row containing text with new-line characters, such as: <td id='line-numbers'> <span class="number" id="1">1</span><br> <span class="number" id="2">123</span>< ...

Is there a way to connect CSS files from a different directory?

I'm currently in the process of developing a website and I encountered an issue with linking my CSS file, which is stored in a different folder. I originally had it in the same directory as my HTML code, but now I need to figure out how to link it pro ...

Trigger fixed element to appear/disappear when scrolling using JavaScript

I've tried multiple solutions, but I can't seem to get this functionality to work properly on my website. I'm attempting to create a "schedule a demo" button similar to the one on www.bamboohr.com Currently, I have the following html, css, ...

The color of the element remains unchanged even when hovering the cursor over it

Below is an example of HTML code: <h1 class="one">Hello</h1> Here is the corresponding CSS style sheet applied to it: h1:hover { color: red; } h1.one { color: blue; } When this code runs, the h1 element should turn blue. Ho ...

Is there a different option to <br /> that allows me to adjust the spacing between lines?

Consider the example below: Line1 <br /> Line2 To create a line break between Line1 and Line2, I have utilized <br />. However, due to lack of cross-browser compatibility in setting the height of br, I am seeking an alternative approach. Any ...

Changing color of Font Awesome Icons upon hover, without any animation

I need assistance with changing the color of font awesome icons on hover without any animation. Specifically, I want the icon colors to transition from indigo to blue and finally red when a user hovers over them, without the colored icon appearing abruptly ...

Issue with :hover pseudo-class in IE8

If you're unsure about my explanation, check out the video for a visual demonstration. Pay close attention to the cursor movements while I attempt to optimize my website for IE8. Hopefully there is a solution to this issue. Thank you in advance! http ...

The css values for component _nghost-c0 in an Angular application

Recently, I've been delving into Angular 5 and couldn't help but notice the peculiar html tags with ng generated attributes like _nghost-c0 and _nghost-c1... This got me wondering, what exactly do these attributes signify? [_nghost-c3] .employee ...

Issues with the functionality of the accordion menu

I have implemented an accordion menu on my website. However, I am facing an issue where the 2nd menu always slides up when it gets loaded instead of sliding up after clicking on it. I want the behavior to change so that the sub menus elaborate only upon cl ...

Using Flexbox to ensure two elements do not appear next to each other

When viewing on large screens, I want all elements to be on one row. On smaller screens, I want them to be on three rows. Specifically, I don't want to see the button next to the H1 element on the same row. How can flexbox help solve this problem? Tha ...

Tips for updating CSS styles for multiple innerHTML elements using a JavaScript for loop

<div id="test"></div> <script type="text/javascript"> window.names=["jin kazama", "nina williams"]; window.values=[25, 37]; len=names.length for (var i = 0; i < len; i++) { document.getElementById('test').innerHTML+ ...

Placing a div with position:absolute inside another div with position:absolute and turning them into position:fixed

HTML <div class="box1"></div> <div class="box2"> <div class="box3"></div> </div> CSS Properties of box1, box2 and box3 are: box1 { position: absolute; z-index: 100; background-color: rgba(39, 39, 39, 0.3) ...

Switch up the positioning of elements using jQuery

My webpage contains multiple elements that are absolutely positioned with the CSS attribute "top." I am looking to adjust the top position of each element by 20px. This involves retrieving the current top position and adding 20px to it. The quantity of e ...

Chrome's Tab key causing unremovable black border [2022]

Is there a way to change the color of the black box shadow to a different hue when switching between nav tabs using the Tab key? Here is the code snippet: <ul class="nav nav-tabs m-5"> <li class="nav-item"> <a clas ...

What is the syntax for indenting text inside an inline-block element?

Essentially, the checkboxes displayed here are in a graphical format to avoid using checkbox elements for accessibility reasons (only the link should be interactive). However, aligning a span next to an href and indenting the text to line up with the star ...