Out of nowhere, the functionality for printing labels in html/css has stopped

For over 3 years, a website has been successfully printing labels for shoes. However, the functionality suddenly broke two days ago, specifically the labels or page-break-after feature stopped working correctly.

Despite searching online, I was unable to determine the cause of this issue.

The expected behavior is for each label to be displayed on its own page so that the label printer can accurately print it.

Here is the CSS code snippet:

  h1, h3, h2, h4 {
    margin-bottom: 1px;
  }
  h6 {
    margin: 0px;
    direction: ltr;
  }

  .col-4, .col-2, .col-8 {
    padding: 1px;
  }

  @page {
    size: 10cm 5cm;
    margin: 0.2cm;
  }

    img {
      width: 95%;
      height: 60px;
    }   

  p.att-value {
    font-family: 'Almarai', sans-serif;
    font-size: larger;
    margin: 0;
    padding: 2px;
  }
  span.value-block {
    background-color: black;
    color: white;
    padding: 5px;
  }

  .a-label {
    height: 10cm;
    width: 5cm;
    padding-top: 5px;
    padding-right: 30px;
    margin-bottom: 0.1cm;
  }


  @media print{
    html, body {
      width: 10cm;
      height: 5cm;
    }   
    .pagebreak {
      break-inside: avoid;
      break-after: page;
    }
  }
<div class="a-label">
  <div class="row">
    <div class="col-12 text-center">
      <img src="https://i.sstatic.net/FxCHC.png">
      <h6>123456</h6>
    </div>
  </div>
  <div class="row">
    <div class="col-12">
      <h3>Shoe Name</h3>
      <p class="att-value">
        <span class="value-block">Product Name</span>
        <span class="value-block">Size: 36</span>
        <span class="att-value"> 250 usd</span>
     </p>
    </div>
  </div>
</div>
<div class="pagebreak"></div>



<div class="a-label">
  <div class="row">
    <div class="col-12 text-center">
      <img src="https://i.sstatic.net/FxCHC.png">
      <h6>123456</h6>
    </div>
  </div>
  <div class="row">
    <div class="col-12">
      <h3>Shoe Name 2</h3>
      <p class="att-value">
        <span class="value-block">Product Name</span>
        <span class="value-block">Size: 36</span>
        <span class="att-value"> 250 usd</span>
     </p>
    </div>
  </div>
</div>
<div class="pagebreak"></div>

This issue is present across all browsers.

https://i.sstatic.net/0iiJV.png

Answer №1

Updating to the most recent version of bootstrap, which is version 5, allowed the feature to start working again. I am puzzled as to why it stopped working all of a sudden, especially considering it had been functioning for the past 3 years.

I appreciate the useful input from @AndrewMorton. Credit belongs to him for helping resolve the issue.

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

Tips for properly aligning an image within an owl carousel

Currently, I am attempting to center a small image within the owl carousel. While I have managed to center it when it's active and in the center, I'm encountering issues when the item no longer carries the "center" class. You can access Owlcarou ...

Which is the better option: assigning a separate function to each object or binding one function to all objects simultaneously?

I have a loop that dynamically appends links to the element with id #content. I have implemented 2 different ways to achieve this. (1) $.each(array, function(key, value) { $('#content').append('<a href="#">text</a>'); ...

What is the best way to implement a dropdown menu with JavaScript or jQuery?

I'm looking to create a dynamic dropdown list using Javascript or JQuery that mirrors the functionality of selecting countries, states, and cities. Can someone provide guidance on the best code to achieve this? Below is a snippet of my existing code: ...

Adjust your path by 45 degrees

I'm facing a challenge in getting all three of my images to fly off the screen in different 45-degree directions. Currently, they are all flying off the screen to the left, but I would prefer them to go in 45-degree angles. I've shared the CSS, H ...

Ways to eliminate HTML elements from displayed content

I need help removing the <p> tags from comment text that is rendered. When passing the content to a component as a prop, I am experiencing issues with the v-html directive not working correctly. How can I render the content without the HTML tags? C ...

Issues with the styling of a CSS webpage within an AJAX application

I'm encountering an issue with my CSS style that works fine on a static HTML page. The problem arises when content is dynamically loaded into layer3 and then into layer 2. I'm struggling to understand the consistency as sometimes the layers are ...

Encountered an issue retrieving two rows nested within a parent row using Bootstrap 4 and VueJs

Currently, I am working on a VueJs and Bootstrap4 component where my aim is to achieve a design similar to the one shown using the available bootstrap classes. After going through the documentation, I came across the customized classes h-75 and h-25 provi ...

CSS for a navigation menu with underlined links

I am attempting to create an underline effect when hovering over a link. However, I am facing an issue where the underline does not align perfectly with the line below it. Can someone please guide me on how to modify this CSS so that when the link is hov ...

Is there a way to implement the border-box property for Internet Explorer versions 6 and

Similar Question: How to implement box-sizing in IE7 Anyone know a method or workaround to apply box-sizing:border-box; in IE6 and IE7? Even just for IE7? ...

Struggling to display a function's output on a separate web page within a flask application

After spending close to 10 hours on this, I find myself stuck. My restaurant search app is functioning perfectly when I print the output to the terminal. However, I can't seem to figure out how to display it on a new page. Here's a snippet of my ...

Animated CSS side panel

I'm currently working on creating an animation for a side menu. The animation works perfectly when I open the menu, but the problem arises when I try to animate it back closed. Is there a property that allows the animation to play in reverse when the ...

Tips for incorporating multiple choices on the PayPal checkout page or creating a dedicated page for various options

I am seeking guidance on how to offer multiple donation options on a checkout page. Imagine a non-profit organization with several different programs. They want to provide users the opportunity to donate to specific programs, in varying amounts, all at on ...

data not being transferred successfully to the SQL input from forms

The data from this input form is not being properly transferred to the SQL database when using the sqlAddUser.php file available at pastebin.com/W9BH0D3s. The form includes the following fields: <form action="sqlAddUser.php" method="post"> <div c ...

Placing a point on a measurement scale according to a changing factor

I am completely new to html, css, and javascript. My goal is to create a color gradient bar and then place a dot on it based on a variable. I tried to implement a solution I found from various sources, but it is not functioning as expected, and I am seekin ...

Scrollbar customization feature not functional in Firefox browser

I recently finished developing a website and I have customized the main vertical scrollbar. Unfortunately, I am facing an issue where it works well on Google Chrome and Safari but not on Mozilla Firefox. Does anyone have any suggestions on how to trouble ...

Utilizing Javascript to Trigger a Website Call Upon Changing a Select Box in HTML

Hello, I have a question. In my HTML code, I have a selection box. What I would like to achieve is that when the selection is changed, a website is automatically called with the selected value. For instance: <select> <option value="a">a&l ...

What is the best way to implement a loading cursor when the Submit button is clicked?

Is there a way to incorporate a progress cursor into my code in order to notify the user to wait when they click the Submit button or the Upload Button while uploading multiple files? Below is an example of my form: <form action="" method="post" enct ...

What is the process of incorporating a select form within a component?

I am currently working on creating a user registration form. Once the form is filled out and the submit button is clicked, I need the values from the form to be displayed in a specific <p id="data></p> component. Can anyone assist me with this ...

Ignored are the white spaces within a pre tag

From what I understand, the 'pre' tag is supposed to collapse all white spaces and tabs into one space. However, I have noticed that this doesn't happen for me. I'm curious as to why this may be the case. Could it possibly be dependent ...

Drag and drop functionality in Jquery using unique data-ids

I am new to using drag and drop features. Jquery : function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { var dataId = ev.target.parentNode.getAttribute('data-id'); alert("Data Id : "+dataId); var selectedTable =$ ...