variety of heights in the product grid for an eclectic look

Hey there! I'm currently experimenting with a simple product grid for testing purposes only. It's not a final design, just trying to work out some kinks. One issue I'm facing is with the heights of the elements. When text spans over two lines, the layout breaks. I've tried looking for solutions online but couldn't find anything helpful. Initially, I thought it was because of the image.

If you want to see an example, check it out here: http://jsfiddle.net/pp6L8/9/

HTML:

<section class="shop-grid">
  <div class="container">
    <section class="col-group">
      <article class="col-3">
      <div class="item-container ">
        ... (content continues)
      </div>
      </article>
      ... (more article sections)
    </section>
</section>

CSS:

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: normal;
}
.product-name {
    margin: 20px 0;
    padding: 0;
}
... (CSS rules continue)

Answer №1

We need to update this css...

.product-name {
    height: 30px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 20px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

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

Utilizing a hidden file-input, IE10 is able to transmit a FormData object via ajax

I'm encountering difficulties when trying to send a form that includes a display:none file-input via ajax. It works fine in Chrome (46.0.2490.71), but not in IE10 (10.0.9200.17492). I've tried various solutions without success, and it's cruc ...

Utilizing checkboxes to dictate PHP and MySQL queries

Seeking assistance with MySQL, jquery and PHP. Here is the code provided: HTML <label class="checkbox"><input type="checkbox" name="code_site1" class="code_site1" checked="checked">Code 1</label> <label class="checkbox"><input ...

Exploring ways to style font families for individual options within ng-options

I am looking to display a combobox where each option has a different font. While using the ng-options directive in AngularJS to populate the options for a <select> tag, I am struggling to set the font-family for individual options. $scope.reportFon ...

Adjust background color as you scroll

Is there a way for me to smoothly change the background color to a solid color as I scroll? I want the transition to happen seamlessly. Check out this link for an example <div class="sticky-nav"> </div> .sticky-nav{ position: fixed; widt ...

Enable scrolling-triggered animations

I need to add animation to my header when the user scrolls on the page. Here is the code I am using: $(document).scroll(function () { var value = $(this).scrollTop(); if (value > 150) { $( "body" ).addClass( "scroll" ); $( &q ...

Can someone explain why line-height can affect the width in CSS?

Can you explain how the line-height property functions in CSS? I have noticed that when I set the line-height to be equal or less than the font size, it causes layout width issues. You can view an example of this problem on a jsFiddle here. Currently, my ...

Enhanced jQuery implementation for hiding elements

I encountered a peculiar issue where jQuery's .is(':hidden') function wrongly returned true for an element that visibly displayed content. You can see the problem demonstrated in this fiddle. The :hidden pseudo checks both offsetWidth and o ...

Transmit targeted information to a different webpage

Hello, I have multiple radio buttons but I only want to send selected ones to my insert PHP file. How can I choose specific inputs and send them to another page with just one button? My code is quite lengthy. This looks like a duplication x7 Welcome to ...

Using JavaScript to ensure that a background image is only displayed once in an HTML document

I am currently working with two cells, where I have set background images for these cells using Javascript from an array of images. The images available are: image1= 150*150 referred to as image1 once image2=150*150 referred to as image2 once However, ...

What is the best way to create two responsive thumbnail columns with equal height using bootstrap?

Need help with creating responsive columns similar to a thumbnail carousel, with the image centered at the top border Struggling to figure out how to achieve this using Bootstrap. I have created a mockup in Photoshop and included a link for reference. Any ...

What is the method to showcase content by category with a button click within the same page using Django?

I am currently working on a portfolio project where I need to categorize the projects based on their categories. I have added buttons for each category and I want to display the contents of each category below the respective button when clicked. For exampl ...

Styling Material UI components with CSS is a great way to

I'm facing difficulties while working with Material UI components. Currently, I have a Material UI table and I want to center-align the text within it. The standard CSS of Material UI contains an element named MuiTableCell-root-60 which has a text-a ...

Displaying an interactive 2D floorplan in a web browser with the use of html5 and javascript

In the process of updating my old Flash viewer, I am looking to display interactive 2D floorplans exported from AutoCAD. Currently, I convert the AutoCAD files into XML files containing the X and Y coordinates of the various elements on the floorplan such ...

Update the class of pagination to "active" using jQuery

I need assistance with pagination. Here's the code I have so far: <?php for($i = 1; $i<=10; $i++){ ?> <a class="pagenumber" href="?p=<?php echo $i; ?>"><?php echo $i; ?></a> <?php } ?> What I want to d ...

list without specific order spacing

I have implemented an unordered list in the footer section of my HTML document. Within this list, the first two items consist of social media logos displayed as images. To enhance their visibility and prominence within the footer, I have assigned them a wh ...

How to Deactivate Horizontal Scrolling Using CSS in WordPress

Hey there, I'm currently working on a WordPress blog and facing an issue. Here's the link to my problem: When I resize the browser (X-Axis) to a minimum, like when using a mobile device, I noticed that I can scroll to the right in the Content se ...

Tips on solving the Navigation bar burger problem with HTML and CSS

## I am having trouble making my navigation bar responsive using HTML and CSS as the navigation burger does not appear in mobile view ## To take a look at my code on jsfiddle, click here: [jsfiddle] (https://jsfiddle.net/abhishekpakhare/nxcdso7k/1/ ...

Struggling to keep navbar fixed with a blur effect without it colliding with body content as you scroll?

I'm looking to create a sticky navbar with a blur effect similar to the one seen on (try scrolling to see the blur effect on the nav). I want it to have the following structure: My HTML code is as follows: <header class="sticky z-10 top-10"> ...

What is the proper way to insert a line break within a string in HTML code?

Trying to simplify my code, I've turned to using Nunjucks to pass a group of strings to a function that will then display them. This is what it looks like: {% macro DisplayStrings(strings) %} {% for item in strings %} <div>{{ item.strin ...

Bootstrap 4 image gallery with thumbnails sizing

I'm facing an issue with my responsive image gallery that has only 6 thumbnails. Everything looks great on large and medium devices, but in mobile view, the thumbnails appear too small. Adding padding doesn't work as it breaks the side margins al ...