Creating a Div element to occupy an entire row is a simple task that can be achieved

Seeking a solution to automatically generate a DIV when our products do not fill up the entire row, using the MixItUp jQuery filter and sort plugin.

Is there a JavaScript code that can detect the empty space in a row and create the necessary div to maintain the pattern?

See where this should happen: printnil.com

.container{
  text-align: justify;
  font-size: 0.1px;
  -webkit-backface-visibility: hidden;
  float: left; 
  background: #fff;
  width: 100%;
}

.container:after{
  content: '';
  width: 100%;
  display: inline-block;

}

.container .mix,
.container .gap{
  margin-bottom:1.5%;
}

.container .mix{
  display: none;
}

.container .mix:after{
  content: attr(data-myorder);
  vertical-align: top;
}

.container .mix:before{
  content: '';
}

.mix{
  text-align: justify;
  display: inline-block;
  width: 100%;
  position: relative;  
  box-sizing: border-box;
  background: #f2f2f2;
}

@media only screen and (min-width:568px){
.container .mix,
.container .gap{
  width: 49.5%;
  margin-bottom:1%;
}
}

@media only screen and (min-width:1024px){    
.container .mix,
.container .gap{
  width: 33%;
  margin-bottom:0.5%;
}
}

Answer №1

It appears that you have found the desired outcome.

.container {
font-size: 0.1px;
background: #f2f2f2;
width: 100%;
}

.container .mix {
width: 33.33%;
}
<div id="Container" class="container">
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix  mappen" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
  <div class="mix" style="display: inline-block;">
    <img src="//cdn.shopify.com/s/files/1/0600/1373/products/agenda-cove_grande.jpg" alt="Agenda" height="100" width="100"/>
  </div>
</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

Eliminating Repetitions in Array of Objects by Filtering Out Objects with Matching Properties

I am currently working with an array of objects where I need to identify duplicates based on specific properties (first and last names). Below is my attempt at solving this issue: The expected output should resemble: [ {first:"John", last: "Smith", id: ...

Modify the component's background color when hovering

Is there a way I can modify the background color of the entire panel on hover? I am currently using a simple bootstrap panel with bootstrap-react: <LinkWrapper url={url}> <Panel header="text" bsStyle="primary"> <p>text.</p> ...

The NVD3 chart embedded in a React application generates HTML elements that persist on the page indefinitely without fading away

In my React application, I integrated an NVD3 scatter chart. However, I have encountered an issue with the tooltip not disappearing when hovering over the chart: https://i.stack.imgur.com/6lLok.png After moving the cursor away from the chart, the tooltip ...

Preserving form data using JavaScript exclusively upon submission

Hey there! I'm facing a little issue with a Form that has multiple checkboxes and a piece of JavaScript code designed to save the state of each checkbox when the user hits submit. My problem is that, currently, the checkbox state is being saved even i ...

Is it possible for the "queue" method in jquery to be executed multiple times?

Check out my jQuery code: $('input').click(function(){ $('h1').empty().queue(function(){ console.log('queue'); }); }); }); After clicking the input for the first time ...

Adding options to an HTML select dropdown menu using data stored in an array

Having reviewed several questions related to this issue, I am still encountering difficulties. Below is the code snippet that I am struggling with: <body> <?php //To begin, there is a form with a drop-down menu and a button, which will trigge ...

Issue with alignment in the multiselect filter of a React data grid

In React Data Grid, there is a issue where selecting multiple filter options messes up the column headers. Is there a solution to display selected filter options above a line in a dropdown rather than adding them to the column header? The column header siz ...

Align the items in the center of a Bootstrap navigation bar

I am looking to center the navigation menu items on my navbar. Currently, my navbar layout appears like this: https://i.sstatic.net/BqRwW.png Specifically, I want "Users", "Admin", and "Records" to be centered within the navbar. Additionally, I would lik ...

JavaScript Ping Pong Challenge

I'm currently investigating why the browser returns NaN for the Positions. The game is being rendered in a loop and updated as soon as the monitor is ready, which is defined in the update() function and runs infinitely. The reset() function is a part ...

[entity: undefined prototype] { type: 'clip', info: 'Watch my latest video!!' } using nodejs - multer

import routes from "./routes"; import multer from "multer"; const multerVideo = multer({ dest: "videos/" }); export const localsMiddleware = (req, res, next) => { res.locals.siteName = "Webtube"; res.locals.routes = routes; res.locals.user = { isA ...

Implementing conditional validation with jQuery Validate

Utilizing jQuery-validate 1.11.0 In the form, there is a condition where if text is input in field A, fields B & C become required. If text is entered in field B, A & C become required and so on. Furthermore, if any text is entered in Field D, it ...

Enhance your theme property in Styled Components by incorporating numerous style properties

Currently, I am delving into the world of styled components for a fresh project and exploring the theming capabilities it offers. I am finding it challenging to determine the best practice for adding multiple style properties to a single object, essentiall ...

Is it possible to provide unrestricted support for an infinite number of parameters in the typing of the extend function from Lodash

I am utilizing the "extend" function from lodash to combine the objects in the arguments as follows: import { extend } from 'lodash'; const foo1 = { item: 1 }; const foo2 = { item: 1 }; const foo3 = { item: 1 }; const foo4 = { item: 1 }; const f ...

Determine the total value of NodeJS for a particular date by parsing through JSON data

Currently in the process of learning NodeJS and exploring data calculations, Suppose we have JSON data from a URL with around 100 entries: [{ "ID": "01", "sales": 11, "points": 5, "date": & ...

Managing multiple Angular calls when additional submit buttons are present

I am working on a form that includes a drop-down menu, check box, and four buttons. Whenever any action is taken (such as checking/unchecking the box, selecting an option from the drop-down, or clicking a button), it should trigger a service call to update ...

Using jQuery to add emoticons to a div element

I am currently developing a small chat application and I would like to incorporate emojis into it. My goal is to allow users to click on an emoji, which will then appear in the text area where they type their message. When a user clicks on "select," I want ...

What is the best way to persist my data on a page when I navigate to a different page in React.js?

Currently, I am utilizing Material UI tabs with 8 pages as components. Each page contains input areas, and when I switch between tabs, the data in the inputs gets cleared. I want to retain this data even when moving to another tab. How can I achieve this ...

Calculating the 3D Longitude and Latitude coordinates in a THREE.js globe using the radius along with the x and y values

Currently, I am exploring a Codepen where JSON data is being utilized to feed into a JavaScript application that maps coordinates using x and y values. Rather than utilizing longitude and latitude to map a location like Hong Kong, the developer uses these ...

What are the most effective ways to manage state in form components using React?

As I delve into the realm of best practices for managing state in React components, I find myself grappling with different approaches. Initially, I crafted a form by creating a TextField component structured like this: var TextField = React.createClass({ ...

Pass the $scope object from a controller to a modal controller

I am facing an issue with transferring the $scope variable from ctrlone to ctrltwo, which is a modal window on my page. When I open the modal in ctrlone, my code looks like this: var modalInstance = $modal.open({ templateUrl: 'Modal.html&ap ...