Stop text from breaking out of the flexbox container

I am trying to integrate an image with a text link into a flexbox container. However, I am encountering an issue where the container breaks and appears incorrectly on smaller screens:

https://i.sstatic.net/4DvY1.png

 <el-container>
    <el-main>
      <div class="top">
        <div class="download-compiler">
            <div class="dmd-download">
                <el-image src="http://dlang.ru/imgs/dmd_logo_128.png"></el-image>
                <el-link style="color: black; font-size: 1.3em;">DMD</el-link>
            </div>
        </div>
        <div class="code-snippets">
          <div class="code-snippets-header">
            Samples:
          </div>

          <div class="code-snippets-content"></div>          

        </div>
      </div>

      <div class="middle">
        <div class="main-app-img">
        </div>
      </div>

    </el-main>
</el-container>

You can view the minimal jsfiddle example here.

Answer №1

It's a bit unclear what your goal is, but after reviewing your jsfiddle, I noticed that simply eliminating the height: 20% property from the .top class will ensure that the image and text consistently remain within the pink area.

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

What is the best way to loop through jsoup elements while skipping the initial two results?

Extracting desired data from the following HTML snippet: <div class='col5'> <strong><a href="/stellenangebote/107278-supporter-sap-crm?page=1&amp;query%5Bcity%5D=&amp;query%5Bradius%5D=100&amp;query%5Btext%5D=SOA+SAP" ...

Javascript Popup Functionality Failing to Execute

It seems that the popup link does not function properly when placed between the <script> tags. if(data.userdata["money_back"] == 1){ chat_list += '<a data-popup-open="popup-90">Download</a>'; } On the other hand, when the pop ...

Unable to add a figcaption to a figure element that were created using the createElement method. The attempt to execute 'appendChild' on 'Node' has failed

My goal is to dynamically generate a figure element and then add a figcaption to it. var newFigure = document.createElement("figure"); var newPictureCaption = document.createElement("figcaption"); $(newPictureCaption).html(imgcaption); //this part fills t ...

The tooltip being displayed is plain and lacks any design elements

When I hover over my a element, only a simple tooltip appears without any styling, unlike what is shown in the Bootstrap documentation. (I am creating the a element using JavaScript) HTML <!DOCTYPE html> <html lang="en"> <head> ...

Installation banner vanishes when PWA is scrolled

Successfully transformed my website into a PWA, everything is functioning properly except for a minor issue with the Install Banner popup. The banner shows up at the bottom of the page, as intended, but disappears when the user scrolls down, only to reapp ...

Bring in the SCSS directory from the overarching SCSS program

I am currently working with Angular (Jhipster) in my application and I am looking to include multiple .scss files in my global.scss file. To achieve this, I have created a folder called "util" at the same level as the global.scss file and placed these .scs ...

What is the best way to retrieve the value of an element enclosed within a tag?

<div class="player__AAtt"> <div> <play-js data-account="1234567890" data-id="32667_32797"> </play-js> </div> </div> Is there a way to extract the values of data attr ...

Understanding fluid design concept

Check out this example. I've noticed that when resizing the viewport, the font size within the .main class increases while there is no change in the .aside class. Can someone help shed light on this for me? Thank you in advance! ...

Using attribute value for CSS background-image styling is a handy technique to

In my current situation, the design calls for the use of two different images as background images - one for desktop and another for mobile. These images are uploaded through a CMS, allowing me to retrieve the URLs for both using PHP. Is there a way to pa ...

Manually adjusting the aria-expanded attribute to "true" does not result in opening a new tab

After a certain condition is met, I want to open another tab. Below is my bootstrap navbar code along with the jQuery script. <ul class="nav navbar-default nav-justified" role="tablist" id="navbar"> <li role="presentation" class="active"><a ...

Unable to input Email ID and Password within a Selenium Java script for a Bootstrap dropdown menu on the website "https://qa01.pdng.pepsico.com/" without using a frame

To place your Email ID and Password into the appropriate input fields with IDs j_username and j_password, refer to the following HTML code snippet. There are no frames within this code preventing its utilization. ul class="nav__links nav__links--shop_in ...

Display or conceal information in a distinct container in AngularJS by selecting any cell in a table

In the following demonstration, I am displaying multiple values in a single cell of a table. If a particular row's cell has only one value, there is no action needed. However, if it contains more than one value, we can hide and show these values withi ...

What is the best way to prevent HTML escaping in a HAML form?

I am facing an issue when I edit my HAML form as it renders the &ampersand; value in the text field. Even though I have set escape_html to true, it still displays the &ampersand; value. What could be the mistake on my end? Am I using the correct sy ...

selection menu and advancement gauge

While working on my code, I have a task where I need to make the progress bar move a specific amount when a name is clicked based on the option's value. <!DOCTYPE html> <html> <head> <title>testinggg</title> &l ...

Increase scrolling speed? - Background abruptly moves after scroll

I'm facing a minor issue. I want to create a parallax background effect similar to what can be seen on nikebetterworld.com. In my initial attempt, I managed to achieve some functionality, but I believe it can be improved. As I scroll, the background p ...

Eliminate :hover effects from the :after elements' content

I am trying to eliminate the hover effect from the content inserted using the css selector :after. Below is my code where I want to remove the underline hover effect from > HTML <ul class="path_string_ul"> <li>Home</li> <l ...

Exploring the Scope of LocalStorage in Javascript

I've recently begun working with local storage and encountered some scope issues. Whenever I try to console.log(test), the second if statement returns undefined. What am I missing here? This is my current code; $("document").ready(function(){ ...

Retrieve the accurate placeholder color using JavaScript

I modified the default placeholder color of my input to blue. How come I am seeing a black placeholder color when using JavaScript? const fetchPlaceholderColor = () => { let inputElement = document.querySelector('.myClass'); let inputEl ...

Adaptable/Responsive Layout

Thank you for taking the time to look at this post. I am currently working on gaining experience with html, CSS, and JavaScript in hopes of entering the Front End Developer field. Today, I encountered a few issues while working on this adaptive design. He ...

We need to display JSON data from a URL onto an HTML page within a table format

Could someone assist me with fetching JSON data from a URL Link on Amazon AWS and displaying it in an HTML table? I am a novice at this, so please explain it easily. Below you can see the HTML code, JS code, and sample information that I would like to ex ...