Is there a solution for the left flex-item collapsing on iOS when there are numerous inline elements on the right side?

Upon observation, I have noticed that on iOS (or iPad, since I do not own an iPhone), when there is a multitude of inline elements in the right flex-item, the left flex-item appears to collapse:

<div style="display: flex;">
  <div style="display: flex; align-items: center;">
    <div style="white-space: nowrap;">
    Wanna Stay Center n Don't Push Me.    
    </div>
  </div>
  <div>
    <span>Push!!</span>
    <span>Push!!</span>
    <span>Push!!</span>
    <span>Push!!</span>
    <span>Push!!</span>
    ...
  </div>
</div>

https://jsfiddle.net/jpLo0ava/2/

Further investigation revealed that this issue occurs on both Chrome and Safari. Could this be a browser bug or related to incorrect CSS usage? How can I address this situation if my intention is for the left text to remain vertically centered?

Answer №1

Okay, I found success by applying flex-shrink: 0; to the left element...

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

Executing ShiVa code from inside iOS applications

Exploring ShiVa3d and iOS is a new endeavor for me. I have a vision to create an iPad app that combines objective-c logic with simple lua code in ShiVa. Imagine this scenario: 1) The app features a single model for viewing. 2) In my ShiVa lua MainAI, I ...

The location layer on my Google Maps is not appearing

For a school project, I am working on developing a mobile-first website prototype that includes Google Maps integration. I have successfully added a ground overlay using this image, but I am facing issues with enabling the "my location layer". When I tried ...

Adding the children of JSON objects to every individual div element

How can I add each day's players [day-1, day-2, day-3, day-3] wrapped in a <span> into the .card-body section as required? The goal is to load only four card-body. var vehicles = { "day-1": { "player-1-1": "Ford", "player-1-2": "BMW ...

Is your Jquery validation malfunctioning?

I am currently facing a challenge with required validation on an asp.net page. In order to validate the inputs, I have implemented multiple controls which can be hidden or displayed based on certain conditions. These controls include checkboxlists, dropdow ...

Jquery is not working as expected

I am having trouble implementing a jQuery function to show and hide select components. It doesn't seem to be working correctly. Can someone help me identify the issue? <html> <head> <meta charset='UTF-8' /> <script ...

Some cells are not invoking the delegate method didSelectRowAt

I am experiencing an issue where didSelectRowAt is not being triggered for certain custom cells. Additionally, I have incorporated a gesture recognizer on the tableView. In an attempt to resolve the issue, I modified the shouldReceive method as follows: f ...

Displaying selected list item while concealing the original

I have a dropdown menu with several options. What I am looking for is to have it so that when we click on the drop down, a list of choices appears. Then, when we select an option from the dropdown, the original selection should be replaced with the one th ...

What is the best way to highlight all cells in a tableview using a custom button in Swift?

I'm currently working on a tableView that consists of cells with imageView elements. When the user clicks on an imageView, I want it to appear in grayscale. Is there a way to select all rows using a bar button item? If anyone can provide guidance o ...

Show picture depending on the button pressed

Is it possible to only display the selected image? I have a set of buttons that allow customers to customize an image. For example, the user selects a shape like a circle, which is then displayed. The next step involves selecting a pattern to display insi ...

Submitting values using the serialize method and Ajax involves sending placeholders

Looking for a solution: <form class="pure-form pure-form-stacked" method="post" enctype="multipart/form-data"> <input type="text" name="name" class="button-size-1" placeholder="*Name"> <input type="text" name="email" class="but ...

Tips for preventing the sidebar from extending beyond the footer

I am facing an issue with my sidebar that follows as I scroll. How can I make it stop following when it reaches the footer? Here's what I have attempted so far: $(function() { var floatPosition = parseInt($("#left_menu").css('top')); ...

Is jQuery the solution for tidying up messy HTML code?

Is there a way to clean up this markup using jQuery? <span style="font-size:19px"> <span style="font-size:20px"> <span style="font-size:21px"> Something </span> </span> </span> I'm looking to tra ...

The auto-rotation feature of OrbitControls is not compatible with three.js

Having issues with Orbitcontrols. I have a three.js model that I want to automatically rotate when the page is first loaded, but it's not working as expected. The 3D model remains stationary, almost as if the auto-rotation command is being ignored. H ...

Execute a query (controller action) from within a view

I am currently working on a table that showcases numerical data for each field based on the date. I have a single model dedicated to this task. View: <table class="table-table-verif"> <thead class="fixed_headers"> <tr id = "the ...

Can someone explain why my table in Laravel is only showing the third set of data and not the others?

I'm facing an issue with displaying all of the data in my table named taglineImageCarousel. The problem lies in the slide_ID column, where it is being populated with data from slide-01, slide-02, and slide-03. Below is the code snippet: taglineImage ...

Differences Between Modal View Controllers and Orientation in MonoTouch

Currently, I am displaying a modal ViewController with the ModalPresentationStyle set to UIModalPresentationStyle.CurrentContext in order to have the parent view appear in the background. However, I am encountering an issue when attempting to change the or ...

Content in Bootstrap not filling entire mobile screen

The content in this form does not stretch to full screen on mobile phones, but it appears properly on computers and tablets. Please advise on how to solve this issue. https://i.stack.imgur.com/S2XkS.jpg <link rel="stylesheet" href="https://maxcdn.bo ...

A guide on creating a horizontal card body layout for small screens using Bootstrap 4

Is there a way to make cards horizontal in small (mobile) screens using Bootstrap 4? For example, displaying the card vertically on desktop/larger screens and horizontally on mobile/smaller screens like the image below: https://i.sstatic.net/4IcF2.png & ...

decrease the transparency of the main content on the page while keeping the image within

Is there a way to decrease the opacity of the background color for the body of the document while keeping the background color of the element with the id scene at full opacity? Currently, the opacity for the entire document is set to 0.5. $(".artist"). ...

Show a PDF document on the webpage by making an ajax request in a C# MVC application

Using ItextSharp, I am creating a Pdf from html and trying to show a preview of the Pdf on the screen for the user to interact with. Although the Pdf generation is correct, I am struggling to display it on the screen. Here is the Ajax call: function Pre ...