Flip the second column to the top for narrower screens

I am looking to create a layout with 3 columns. The left column (1) should have text that can resize based on content, the middle column (2) should contain an image of fixed width, and the right column (3) should also have text that can grow or shrink to match the left column (1).

While this seems straightforward, I want these columns to stack vertically on narrow viewports. In this case, the image (2) should appear on top, followed by the left column (1), and then the right column (3).

I am using Bootstrap 4.1 for this project, but I am open to using regular flexbox as well - if only I knew how.

Any suggestions or ideas would be greatly appreciated!

Answer №1

To achieve the desired layout, utilize the flexibility provided by Bootstrap at "https://getbootstrap.com/docs/4.1/utilities/flex/#order". Arrange the elements with a mobile-first approach for smaller viewports and adjust their order for tablet and desktop displays.

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 required widths of table columns are not being adhered to

I'm struggling to create an HTML email that will display correctly in Outlook. I initially used list items and the list-style-image Property, but that doesn't work in Outlook. Essentially, I have a table with 2 rows. The left row has an 11 pixel ...

"Verifying the dimensions of the input sizes with the i

It's possible that this question has been asked before on this platform. However, I haven't come across a satisfactory answer yet. How can I adjust the size of inputs in the iCheck library? The current size is too large for my website. Css: .ic ...

Get rid of the animation that appears at the beginning and end

I have a unique CSS animation of a Pacman character, but I want to customize it so that the mouth remains open at all times instead of having the opening and closing animation. How can I achieve this? .loader{position:absolute;top:50%;left:50%;height:60 ...

Is it possible for an SVG to derive its dimensions from the containing element?

I am currently in the process of transitioning a Vue/Vuetify application from using web fonts for Material Design Icons to utilizing SVG icons instead. With the web font, an example of a heading that includes an icon looks like this: <template> &l ...

How can you selectively add a CSS class during the iteration of a VueJs object?

Using Vuetify components: <v-layout row wrap> <v-flex xs2 v-for="(month, key) in months" :key ="key"> <router-link class = "decoration" :to="month.target">{{(month.month)}}</router-link> </v-flex> The "v ...

Positioning the comments box on Facebook platform allows users to

Need assistance, I recently integrated the Facebook comments box into my Arabic website, but I am facing an issue where the position of the box keeps moving to the left. Here is an example of my website: Could someone please suggest a solution to fix the ...

Issue with Chrome on android causing local website javascript and css to not load properly

The issue I am experiencing is unique to Chrome for Android when accessing a local website. Interestingly, the site functions perfectly on Firefox for Android but encounters problems on Chrome. Specifically, on my website , there is a download link for a ...

Requiring two submissions of the PHP Form Submission is necessary for the Bootstrap Modal hide method to function properly

Check out my previous question Following my previous inquiry, I attempted a recommended solution found here. However, I encountered an issue where the modal wouldn't hide on the initial submission, requiring me to submit the form twice for it to work ...

`The activation of Bootstrap list items through embedded spans`

Apologies for the title, I couldn't think of a better way to explain my issue. I have a list-group and I want the buttons to display a specific color when active. However, it seems that the embedded spans are capturing the click event and not registe ...

Navigating vertically using CSS letters is an effective way to

I'm brand new to this and I'm attempting to create a vertical navigation menu where the links and letters are also positioned vertically. Although I've managed to make everything vertical, I am now facing an issue with the links getting squi ...

Creating a collapsible navbar using JavaScript

I have implemented a responsive navbar that shrinks with the page size using @media screen. Everything works well, but I need the navbar to collapse into a vertical drop-down menu when the page size is very small, requiring a click to open. Unfortunately, ...

Distinguishing between these two hover text types: JQuery CSS, what sets them apart?

As a total jQuery novice, I've been curious about the difference between these two types of text that appear when you hover over something. Can someone please clarify what each one is? Thank you very much. First hover text: When hovering over the up- ...

What is the proper location to place the CSS I wish to implement for a module?

As I embark on creating my inaugural DotNetNuke website, I find myself faced with the task of adding an HTML module to a page. To style the text within it, I have been advised to utilize CSS classes. I'm curious about where .css files should be place ...

The red border highlighting Chrome's input

I want to apply the css style border-color: red; to input elements. But I notice that their dimensions change compared to the default chrome border. You can view the example on jsfiddle: http://jsfiddle.net/79QkJ/2/ In the example, you'll see ...

The hover effect on MUI TableRows is being overshadowed by the background color of the TableCell

I'm currently using @mui/material version ^5.10.1. My challenge is applying the TableRow hover behavior as outlined in the documentation. However, I have also set a background color for the first TableCell in each row, which ends up overriding the ho ...

Tips for adding both a border and bottom border to a button

How can I style a button like this example? Below is my current code: .button { border-color: red; border-radius: 8px } .button::after { content: ''; background-color: red; display: block; width: inherit; height: 3px; } < ...

Ensure that the footer remains at the bottom of the page without being fixed to the bottom

I am currently working on configuring the footer placement on pages of my website that contain the main body content class ".interior-health-main". My goal is to have a sticky footer positioned at the very bottom of these pages in order to eliminate any wh ...

What impact does switching from HTML input to form_for in Rails have on the structure of the code?

Recently, I made some adjustments to the website I've been working on. Initially, it was created using HTML, CSS, and Javascript. There was a section for email subscriptions which originally only had an HTML input field. However, as we started develop ...

Preserve the location of a moveable div using jQuery

I have implemented draggable divs in my JSP page, allowing users to move them around freely. After dragging the divs, I would like to save their positions either in a cookie or database for future reference. Could you please advise on the best way to ach ...

Show jQuery block and make it fade in

I'm attempting to put together a simple tab system where each tab is supposed to appear using a fadeIn effect. In the code below, the .field element is initially hidden with CSS. Although the tabs are displayed correctly, the desired fadeIn effect is ...