Error message: Information not displaying when window is minimized

When I minimize the window, the text is missing.

The text overflows the sides of the window instead of wrapping downwards. Try running the code in a full window first, then adjust the width to see the issue.

I've been unable to find a solution on my own, could you please assist?

This is how it should look like when minimized:

https://i.sstatic.net/TZWo8.png

Here is the fiddle link: https://jsfiddle.net/zgLtbvyv/

/*everything in a column*/
.mb-flex-column{
display: flex;
    flex-direction: column;    
}
    
  
/*image and text in a row*/
  .mb-flex-row{
    display: flex;
    flex-direction: row;
      align-content: center;
}    
/*Flex for correct alignment of image and text, sticking them to the side*/
.mb-flex-item:nth-child(odd) .mb-flex-row{
      flex-direction: row-reverse;
}

.mb-content-wrap{
    display: table;
    overflow: hidden;
}
    
.mb-content{
    display: table-cell;
    vertical-align: middle;
    text-align: left;  
}
    
h4{
    text-align: left;
    padding-top: 0;
}
     
<div id=mb-gara-mobile>
    <div class="mb-flex-column black">
                <div class="mb-flex-item">
                    <div class="mb-flex-row">
                        <div class="image-wrap">
                            <img src="svg/gara1.svg"  alt="">
                        </div>
                        <div class="mb-content-wrap">
                            <div class="mb-content">
                                <h4>Fornøydsgaranti</h4>
                                   De to første øktene er gratis, og du kan kanslerere når du vil.
                                    Fornøydsgarantien gjelder alle elever.
                            </div>
                        </div>
                    </div>
                </div>
        <div class="mb-flex-item">
             <div class="mb-flex-row">
                <div class="image-wrap">
                    <img src="svg/gara2.svg"   alt="">
                </div>
                <div class="mb-content-wrap">
                    <div class="mb-content">
                        <h4>Karaktergaranti</h4>
                        Jeg refunderer 100% av totalbeløpet dersom jeg feiler med å  forbedre karakteren til eleven. Gjelder for elever med startkarkater: 2, 3 eller 4.
                        Karaktergarantien gjelder kun for elever som har hatt mer enn 15 timer med meg. 
                    </div>
                </div>           
            </div>   
        </div>
        <div class="mb-flex-item">
            <div class="mb-flex-row">
                <div class="image-wrap">
                    <img src="svg/gara3.svg" alt="">
                </div>
                <div class="mb-content-wrap">
                    <div class="mb-content">
                        <h4>Oppfølgingsgaranti</h4>
                        Hver lørdag fra kl 0800-1200 setter jeg av en halvtime per elev til oppfølging. I stedet for å møte en gang hver uke, møtes vi to ganger i uken.  Oppfølgingen er gratis. Oppfølgingsgarantien gjelder for alle elever.
                    </div>
                </div>
            </div>
        </div>
    </div;
</div>

Answer №1

An adjustment to your CSS code:

.mb-content-wrap {
    /*display:table;*/
    display:block;
    overflow: hidden;
}

Answer №2

/*creating a column layout*/
.mb-flex-column{
display: flex;
flex-direction: column;    
}
    
    
/*image and text side by side*/
.mb-flex-row{
display: flex;
flex-direction: row;
align-content: center;
}    
/*Flex to align image and text correctly, sticking to the sides*/
.mb-flex-item:nth-child(odd) .mb-flex-row{
flex-direction: row-reverse;
}

.mb-content-wrap{
word-wrap: break-word;
display:block;
overflow: hidden;
}
    
.mb-content{
display: table-cell;
vertical-align: middle;
text-align: left;  
}
    
h4{
text-align: left;
padding-top: 0;
}
<div id=mb-gara-mobile>
    <div class="mb-flex-column black">
                <div class="mb-flex-item">
                    <div class="mb-flex-row">
                        <div class="image-wrap">
                            <img src="http://mathsmattersresources.com/wp-content/uploads/Right-Angle-Triangle-Blue-John-Duffield1.png"  alt="" style="height:50px">
                        </div>
                        <div class="mb-content-wrap">
                            <div class="mb-content">
                                <h4>Satisfaction Guarantee</h4>
                                   The first two sessions are free, and you can cancel anytime.
                                    Satisfaction guarantee applies to all students.
                            </div>
                        </div>
                    </div>
                </div>
        <div class="mb-flex-item">
             <div class="mb-flex-row">
                <div class="image-wrap">
                    <img src="http://mathsmattersresources.com/wp-content/uploads/Right-Angle-Triangle-Blue-John-Duffield1.png" alt="" style="height:50px">
                </div>
                <div class="mb-content-wrap">
                    <div class="mb-content">
                        <h4>Grade Guarantee</h4>
                        I will refund 100% of the total amount if I fail to improve the student's grade. Applicable to students with initial grades: 2, 3 or 4.
                        Grade guarantee only applies to students who have had more than 15 hours with me. 
                    </div>
                </div>           
            </div>   
        </div>
        <div class="mb-flex-item">
            <div class="mb-flex-row">
                <div class="image-wrap">
                    <img src="http://mathsmattersresources.com/wp-content/uploads/Right-Angle-Triangle-Blue-John-Duffield1.png" alt="" style="height:50px">
                </div>
                <div class="mb-content-wrap">
                    <div class="mb-content">
                        <h4>Follow-up Guarantee</h4>
                        Every Saturday from 0800-1200, I allocate half an hour per student for follow-up. Instead of meeting once a week, we meet twice a week. Follow-up is free. Follow-up guarantee applies to all students.
                    </div>
                </div>
            </div>
        </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

Sending form data from View to Controller in ASP.NET's MVC framework

I have recently started exploring JavaScript and I am attempting to extract form data and convert it into a JSON object. Afterward, I want to initiate an AJAX call to retrieve the form results and display them within a ajax.done() function. Currently, I on ...

Is there a way to prevent the slide-out bar from automatically hiding when selecting an item from its list?

I am facing an issue with my dashboard that has a slideout sidebar. Whenever I press the toggle button, the sidebar slides out as expected. However, when I click on any tab within the sidebar, it hides again. I only want it to hide when toggled. My code is ...

I am looking to add values to this HTML request

I have come across this code that helps convert an HTML file being read in .xls format to Google Sheets. The code provided below serves the purpose of finding HTML tables in Google Sheets, but I am looking for a way to append these tables. Here is an exam ...

Struggling to stack two forms on top of each other within a Bootstrap row class

I am trying to incorporate 2 forms on a web page, one below the other. Here is what I have: <body id="Signup"> <form class="row col-lg-6"> <legend>Légende</legend> <div class="form-group"> ...

easy method for creating a hyperlink that triggers a "download" pop-up box

Is there a simple and efficient way to have some of my links trigger the 'save file as' prompt (similar to right-clicking) immediately after they are clicked for the first time? ...

Ways to stop the click event from being triggered in JQuery

There is a single toggle switch that, when clicked, switches ON and a popup with close and OK buttons appears. However, if the toggle is clicked again, it switches OFF and disappears. The specific requirement is that with every click where the toggle switc ...

How can I make a sticky element appear behind a different element?

https://jsfiddle.net/30suam6z/1/ .first { height: 100vh; background-color: red; position: relative; z-index: 2; /* Increase z-index to ensure it covers .test */ } .second { height: 100vh; background-color: yellow; position: relative; z- ...

Using jQuery to encode an ampersand in a URL

I am facing an issue where some URLs with & in them need to be converted to HTML entities using jQuery. The original code looks like this: <div id="box"> <a href="http://domain.com/index.html&location=1">First URL</a> &l ...

What steps are needed to enable the keyboard on a Otree application for mobile devices?

I previously utilized an Implicit Association Task (IAT) in an experiment conducted on computers. However, I now need to adapt this IAT for use on tablets or mobile devices. Here is how the IAT appears on a cellular device: https://i.stack.imgur.com/kNwo ...

Expand the video comparison slider to occupy the entire width and height

I am striving to develop a video comparison slider that fills the height and width of the viewport, inspired by the techniques discussed in this informative article: Article Despite my efforts, I have not been successful in achieving this effect so far a ...

SCSS - Hide div1 when div2 is hovered over

In an attempt to make a div disappear when hovering over another div using only CSS, I have set up two divs: <div class="" id="target">I will disappear</div> <div class="hover_box">Hover me</div> Here is my SCSS code: #target { ...

What strategies can I use to maintain the maximum SVG functionality?

My code snippet works smoothly in Chrome, featuring a zipper effect created by the SVG block inside a PHP for loop. Here is the code snippet: <g transform='translate(0,-2)'> <polygon transform='scale(0 ...

Reset the input field upon button press

Is there a way to clear the input field after pressing the button? <div class="form-group autocomplete"> <div class="input-group search"> <input id="search" name="searchterm" type="search" class="form-control form-control search-input" pl ...

Implementing slideDown() functionality to bootstrap 4 card-body with jQuery: A step-by-step guide

Here is the unique HTML code I created for the card section: <div class="row"> <% products.forEach(function(product){ %> <div class="col-lg-3 col-md-4"> <div class="card mb-4 shadow "> &l ...

What could be the reason behind the button's lack of color change with this particular code?

I'm a beginner in web development and currently practicing HTML, CSS, and Javascript. I've added a button to my html file and would like the color of the button to change when it's clicked on. Here is my HTML code: <button id="box&q ...

Tips on positioning content beneath a fixed header or navigation bar when viewed in a web browser

Hi, I'm having an issue with creating a fixed header using HTML and CSS. When I set my header to be in a fixed position, it covers up the content below it. I want the content to be positioned under the header when the page is loaded. Additionally, I&a ...

Ways to present a pop-up dialog box featuring word corrections

I have developed a word correction extension that encloses the incorrect word in a span element. Upon hovering over the word, a drop-down menu with possible corrections should be displayed. However, my current code is not functioning properly. How can I en ...

What could be causing the misalignment of a button within a Bootstrap navbar?

I'm struggling with aligning the log out button correctly in the navigation bar with a dropdown. I have tried every structure suggested on the Bootstrap documentation page to no avail. Can anyone provide guidance on how to vertically align it properly ...

Looking to duplicate the elements with the click of a button?

I am in need of assistance with my registration form. My goal is to move the elements contained within the <fieldset> tags to the end of a row when the user clicks the + button. The result you see initially has been recreated. Thank you for your s ...

Dragging objects on a map is done using jQuery and it causes them to bounce

Currently, I am working on implementing the JQuery Draggable feature. My idea is to create a map where I can attach image Divs to it dynamically using Jquery. So far, I have been successful in adding the Divs and making them draggable around the map effici ...