Looking for assistance with HTML/CSS code

Adding the code snippet below into my Shopify product-liquid file caused chaos on the page, altering the font and even changing the shape of the add to cart button...

The problematic code is shown below:

<div id="shopify-section-product-icon-gallery" class="shopify-section product-icon-gallery">
<div class="container">
  <div class="icon-box">
    <div class="item " style="width: 33.333333333333336%">
      <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image3.png?v=1576699921">
      <label>Satisfait ou Remboursé </label>
    </div>    
    <div class="item " style="width: 33.333333333333336%">
      <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image1.png?v=1576699921">
      <label>Meilleur prix</label>
    </div>    
    <div class="item " style="width: 33.333333333333336%">
      <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image2.png?v=1576699921">
      <label>Paiement 100% sécurisé</label>
      
      <div id="shopify-section-product-icon-gallery" class="shopify-section product-icon-gallery">

<link href="//cdn.shopify.com/s/files/1/0262/4493/9862/t/2/assets/colors.scss.css?1306" rel="stylesheet"  type="text/css" />

<link href="//cdn.shopify.com/s/files/1/0262/4493/9862/t/2/assets/custom.scss.css?1306" rel="stylesheet"  type="text/css"  />
      
    </div>
    
  </div>

You can view a demo here. (Click 'run' to see it in action)

Answer №1

Don't forget to close your </div> HTML tags. Imagine HTML like a stack - every opening tag needs its corresponding closing tag (in this instance, you have more <div> tags than </div> tags). There are specific instances where closing tags are not necessary (such as with the <img> and <link> tags in your current code).

Answer №2

You forgot to close 3 div tags (</div>) at the end. This mistake could result in shopify styles being applied to content outside of the intended area. Simply add the 3 closing div tags and everything should display correctly.

I've left a comment with the corrected code below:

 <div id="shopify-section-product-icon-gallery" class="shopify-section product-icon-gallery">
    <div class="container">
        <div class="icon-box">
            <div class="item " style="width: 33.333333333333336%">
                <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image3.png?v=1576699921">
                    <label>Satisfait ou Remboursé </label>
            </div>
            <div class="item " style="width: 33.333333333333336%">
                <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image1.png?v=1576699921">
                    <label>Meilleur prix</label>
            </div>
            <div class="item " style="width: 33.333333333333336%">
                <img src="https://cdn.shopify.com/s/files/1/0259/5884/2477/files/image2.png?v=1576699921">
                <label>Paiement 100% sécurisé</label>
                <div id="shopify-section-product-icon-gallery" class="shopify-section product-icon-gallery">
                    <link href="//cdn.shopify.com/s/files/1/0262/4493/9862/t/2/assets/colors.scss.css?1306" rel="stylesheet"  type="text/css" />
                    <link href="//cdn.shopify.com/s/files/1/0262/4493/9862/t/2/assets/custom.scss.css?1306" rel="stylesheet"  type="text/css"  />
                </div>
            </div>
    <!-- Don't forget to add the missing closing div tags below -->
        </div>
    </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

The AngularJS component materializes almost instantaneously

Using AngularJS, I have developed an application where a certain section of code is displayed after the page loads for a split second: <div class="col-sm-4" data-ng-repeat="user in users"> <div class="card"> ...

The form embedded within the <tr> element seems to be malfunctioning

Hey there, I'm facing a little issue with my form that is nested inside a table content. It seems to not be working properly. Let me share the code snippet below: <table> <form name='editpo' method=POST action='js_buat_po.php? ...

Tips to position two shortcode elements next to each other horizontally

I have some code here and I am looking to align the two elements at the bottom, "php echo do_shortcode(wcas-search-form);" and "php do_action('hamzahshop_custom_min_cart');" on the same line horizontally. I am new to this and struggling to figure ...

In Vue, it is not accurate to measure overflow

I am working on creating an overflow effect with tagging that fades out at the beginning to provide a subtle hint to users that there is more content. Here is what it currently looks like: https://i.stack.imgur.com/fXGBR.png To achieve this, I added a fa ...

As the browser window is resized, the HTML div is causing the image to be clipped

Having an issue with the dynamic resizing of Divs containing Images in my HTML Table. The Challenge: The Image within a resizable Div gets clipped at the bottom when the height decreases due to window resizing. To view the problem, visit this Example Pag ...

Having trouble loading the linked CSS file in the Jade template

My directory structure is organized as follows: --votingApp app.js node_modules public css mystyle.css views test.jade mixins.jade In the file mixins.jade, I have created some general purpose blocks like 'bo ...

Leveraging Angular to dynamically adjust the height of ng-if child elements based on parent

I'm struggling with a few things in my current setup. I have a view that consists of 3 states - intro, loading, and completed. My goal is to create a sliding animation from left to right as the user moves through these states. Here is the basic struc ...

A single snippet of JavaScript blocking the loading of another script

I've encountered an issue where the code seems to be conflicting with itself. The top part works fine, but the bottom part doesn't. However, when I remove the top portion, everything works as intended! You can see a working example of both compo ...

choose the initial element within a class

Seeking a way to target the first element within each group of the same class? Consider the following scenario: <div class="group"> <div class="element"></div> <div class="element"></div> <div class="element"&g ...

How can we align divs in the center horizontally inside a parent div?

This question has been asked many times, but I can't seem to figure it out in my situation as I am new to HTML. I have three divs (boxes: QM, Audit, PM) and I want to center them within a parent div called Services. In the photo provided, you can see ...

Aligning UL LI elements vertically for multi-line textORHow to vertically

I am dealing with a ul list that contains both single and multi-line li text. The issue is that the second line of the multi-line text starts at a different indentation than the first line. I need a simple solution to resolve this problem that works seaml ...

The linking process in AngularJS is encountering difficulties when trying to interact with

I've already looked at similar questions, and my code seems correct based on the answers provided. It's a very simple beginner code. <html ng-app=""> <head> <title>Assignment</title> <script src=" ...

Is it possible for a mobile web application to continue running even when the screen is

Thinking about creating a mobile web application with the use of jQuery Mobile for tracking truck deliveries. I'm interested in sending GPS coordinates back to the server periodically. Is this possible even when the screen is turned off? If not, any ...

Ways to update row background color based on specific column values

I need to customize the background color of my table rows based on the value in the "Category" column. For example: Name Category Subcategory A Paid B C Received D If the Category value is 'Paid', I want the ro ...

Is there a way for me to adjust the window's placement?

Currently utilizing Jquery to launch a new Telerik window, as shown below: var win = $('#myWindow').data('tWindow'); win.open(); With the knowledge of the mouse position (x,y), my goal is to initiate the window at that exact location. ...

having difficulty grasping the variable's scope within this code

Here we have a code snippet where the variable vid is initialized inside a function. The question arises on how this variable can be used outside the function, specifically in the context of vid.play(). How does the program know that vid was created usin ...

Generate visual representations of data sorted by category using AngularJS components

I am facing an unusual issue with Highcharts and Angularjs 1.6 integration. I have implemented components to display graphs based on the chart type. Below is an example of the JSON data structure: "Widgets":[ { "Id":1, "description":"Tes ...

unable to modify background color when mouse hovers in CSS

Recently, I implemented this code to style the navigation bar on my website. However, I encountered an issue where the color does not change when hovering over the links. .nav { list-style-type:none; margin:0; padding:0; overflow:hidden; } ...

Video with dynamic sizing doesn't adapt properly

I successfully achieved my main goal, which was to have a background video at the top of my page. However, I am facing an issue with making the video responsive. Currently, as I decrease the screen size, the video shrinks in both width and height rather th ...

Utilizing external CSS to style an SVG file within an HTML document

Hello there, I have a collection of SVG files that I need to dynamically modify the fill color of, preferably using CSS. Here is the structure: <div> <svg width="100%" height="100%" viewbox="0 0 64 64" preserveAspectRatio="xMinYMin m ...