I'm having trouble getting the divs to float properly. Can someone help me figure out why?

Can someone help me with an issue I am having on my website www.7hermanosmx.com/menu.php? Everything seems to be working correctly except for the yellow boxes (class menuholder) which should be floating left three per row. No matter what I try, they just won't cooperate! I know I must have made a mistake somewhere and it's probably something simple, but I can't figure it out. Can anyone point me in the right direction?

I've included the relevant CSS...

.menutop {
font-size: 18px;
color: #FFF;
background-color: #099;
clear: both;
height: 32px;
padding-left: 15px;
padding-top: 5px;
}
.menuholder {
background-color: #FFC;
width: 250px;
height:auto;
float:left;
font-size:14px;
}
.menutext {
font-style: italic;
color: #666;
}

...as well as the HTML code responsible for displaying the content from the database:

<div data-binding-id="repeat1" data-binding-repeat="{{FULL_MENU.data.groupBy( &quot;TYPE&quot; )}}" style="width:100%">
<div class="menutop">{{$name}}</div>
 <div class="menuholder"> <div style="padding:8px">
 <div data-binding-id="repeat2" data-binding-repeat="{{$value}}">
<strong>{{NAME}}</strong> 
<font style="font-style: italic; color: #004000;">({{COST.currency( "$", ".", ",", 2 )}})</font><div data-binding-html="{{DESCRIPTION}}" class="menutext"></div>
<br />
</div></div>
</div>

</div>

Answer №1

Check out JS FIDDLE

Cascading Style Sheets (CSS)

.fl {
display: table-cell;
width: 276px;
float: left;
margin: 5px;
}

For a demo, please visit the following JS FIDDLE link. Thank you!

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

Using JQuery to animate a div tag and automatically hide it after a specific duration

I'm attempting to create an animation where a div tag moves left 300px, hides after 3 seconds, and then repeats the process every 8 seconds. However, my current code only runs the animation once and doesn't repeat the entire process. Below is the ...

Distribute uniform width among child elements using CSS styling

In a fixed-width area, I may need to place either four divs or two divs based on different circumstances. If there are only two divs, they should occupy 50% of the width each: On the other hand, if there are four divs, they should be stacked like this: ...

Creating a Consistent Look for Italic Font Formatting in Tailwind

In an effort to establish consistent typography on a website being developed by my team, we have devised custom utility classes in Tailwind. One of these classes, small-italicized, also requires the text to be italicized. However, it seems that the fontSiz ...

Conceal series of images with a click; reveal them again once completed

I'm working on a layout featuring overlapping images and I'm looking to create a hide-and-seek effect where the images are hidden one by one when clicked, and then shown in reverse order until all of them are visible again – essentially creatin ...

Apply design to a dynamically generated JavaScript id using Stylus

Currently, I am utilizing a jquery datepicker widget, and my goal is to customize the CSS for its input field. However, it seems that the id assigned to that field is dynamically generated upon page load: <input type="text" id="dp1382434269539" style= ...

Issues with styling classes using global SCSS in React are causing unexpected behavior

Currently, I am working on a React project that includes the use of SASS for styling purposes. While implementing modular CSS in my components, I have encountered an issue with applying styles from a main.scss file in my Layout.js component. The unique a ...

Is it possible to integrate Laravel code into CSS styling?

I am currently working on a CMS and one of the key features is allowing users to customize the design. However, I am facing a challenge in figuring out how to utilize the data retrieved from the database to implement these changes. For example, if a user ...

Setting the background color of a table header to 70% width within a table is achievable

I'm looking to style the th attribute with a bgcolor, but only at a width of 70%. The header reads "Mega Event Offer" and I want to give it a background color as well. However, since its width is large, it's overlapping onto the heading. Is there ...

Tips for positioning a canvas and a div element next to each other on a webpage

I have a canvas and a div element that I need to split in a 60% to 40% ratio. However, no matter what changes I make to the display settings, the div is always displayed before the canvas. The Div element contains buttons with color-changing properties fo ...

Generate a secondary table row by utilizing the ::after pseudo-element

I need to add a sub-row to the last row of the table to achieve the look shown in the photo. I am attempting to use pseudo-classes for this purpose, but I am struggling with adjusting the height of the 'tr' element to accommodate the new content. ...

Using the margin property creates an odd spacing issue that seems out of place

Here is the HTML and CSS code that I am using: div { background: yellow; width: 77px; height: 77px; border: 1px dotted red } #one { margin: 0px 21px 41px 41px } <html> <head> <meta charset="UTF-8"> ...

Tips for making a div overlap with Twitter Bootstrap positioning

Currently, I am attempting to utilize Bootstrap 4.5 to position a div over two existing divs. Instead of explaining it through text, the image linked below provides a visual representation of what I am aiming for: https://i.sstatic.net/gbylW.png In this ...

Do static and relative elements without any additional properties always appear in the identical position when rendered?

While working with elements, I have come to understand that when an element has a position of relative, it serves as a fixed point for elements inside it with absolute positioning. Additionally, I have learned that with relative positioning, I have the abi ...

Enhance Your Website with HTML and JavaScript

Here is the code snippet I am working with: sTAT **javascript** var acc = document.getElementsByClassName("item-wrapper"); var i; for (i = 0; i < acc.length; i++) { acc[i].onclick = function(){ this.classList.toggle("selected"); this.nextElementS ...

Navigating through a custom drop-down using Selenium WebDriver: Identifying elements within DIV, UL, and LI

I need assistance automating a custom drop-down field that consists of DIV, UL, and LI elements. Select class or CSSSelector are not viable options due to the dynamic nature of the field. <div id="boundlist-1092" class="x-boundlist x-boundlist-floa ...

Resize all SVGs to a uniform height and align them in a single row within a flexbox container

My goal is to design a banner featuring various accepted payment icons. I aim to resize the images so that they all have the same height, which is the maximum height possible to fit all images in a single row. The images vary in size and aspect ratio, incl ...

Adjusting the height of table rows in Angular within a Razor cshtml file

Is there a way to set the height of a table row and ensure it respects the defined height without taking different heights? I tried using styles with white-space: pre-wrap, overflow: hidden, and text-overflow: ellipsis, but it's not working as expecte ...

Implement a jQuery slideshow with a full background image, aiming to set up a clickable link on the final image of the

Could someone please help me with a query I have regarding a background image slide show using jQuery code? I have set up a slide show with multiple images and would like to make the last image clickable. Is it possible to achieve this specific functionali ...

CSS is not being applied correctly in Safari 13 following a resize

When using Safari, I have noticed that my styles are applied correctly upon page load for any screen size. However, if I resize the window from desktop to mobile and back again, the desktop styles do not get applied. To see this behavior in action, simply ...

Is there a way to verify if the overflow of an element with a width of 100% has occurred?

Here is the structure I am working with: <div class="card"> <div class="container"> <slot /> </div> </div> The Card element has a fixed width of 33rem. The container within it spans 100% of ...