Using Bootstrap 4, create a responsive design that centers images within a div on mobile devices and positions them differently

I am currently working on a DIV that contains social media buttons. The code for this DIV is as follows:

<div class="redes-sociales col-sm-pull-6 col-md-6 col-lg-push-4 float-right py-2">
                <img class="img-rounded img-social" alt="fb" src="img/fb.png">
                <img class="img-rounded img-social" alt="ig" src="img/ig.png">
                <img class="img-rounded img-social" alt="tt" src="img/tt.png">
            </div>

Here is how it currently appears:

social media bar

My goal is to have the icons centered in the middle when the page is in mobile mode, like this:

mobile mode

Can someone advise me on what changes I need to make to achieve this? Thank you!

Answer №1

consider incorporating the following CSS snippet

@media screen and (max-width:768px){
    .social-media{
        float: none;
        margin: 2px auto;
    }
}

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

Center align Bootstrap 4 dropdown menu

I am attempting to center align my dropdown menu using Bootstrap 4. Following the given example: [ This is the result I am achieving: [ This is the code I have implemented: <div class="container"> <div class="row"> <div class=" ...

Accordion-inspired multi-layer list navigation

I have been searching everywhere but haven't found a solution to this issue. My list menu has the following markup: <div id="menu"> <ul> <li>Category #1 <ul> <li>Item #1</li> <li>I ...

translating xpath code into css styling

Can you help me with converting this xpath to css? By.xpath("//div[@id='j_id0:form:j_id687:j_id693:j_id694:j_id700']/div[2]/table/tbody/tr/td"); I've tried a couple of options, but none of them seem to work: By.cssSelector("div[@id=&apos ...

Having all elements at the same height

I am looking to enhance my JavaScript code to only impact 4 items at a time. The goal is to target the first 4 instances of .prodbox, adjust their height accordingly, then move on to the next set of 4 and repeat the process. This sequential adjustment will ...

Python Automation: Saving Excel Files with Selenium

I'm on a mission to download an XLS file for each day of a specific month. However, when I use Chrome's developer tools to inspect the download button for the XLS file, it turns out that it's not actually a button at all. So how can I go abo ...

The HTML dropdown menu is malfunctioning

I've been struggling to create a website with a dropdown menu. Despite following various guides and searching for solutions, the menu is behaving strangely. I've tried numerous tactics, so some lines of code may be unnecessary. The submenu is ap ...

Discovering the following element containing an ID attribute with jQuery

Upon clicking a link, my goal is to locate the subsequent <section> with an ID attribute and retrieve its ID. In the provided code snippet and JavaScript function, the expected outcome upon clicking the link is for "section_3" to be logged in the co ...

Is there a way to adjust the positioning of an image within a <div> element?

I'm attempting to vertically align an image within a horizontal menu bar. My goal is to adjust the padding/margin of the image using inline CSS. However, I've noticed that when I add margin-top or padding-top, it affects the positioning of all m ...

Livewire refreshes dropdown selection

Scenario In my form, I have utilized a livewire component to enable real-time calculations by binding multiple inputs. My expectation is that the dropdown options remain static while the text input fields should be dynamic. Challenge The issue arises wh ...

Oh no! An operational error occurred while trying to access the page "/1" because it seems like the column

I recently started working with Django and I'm trying to figure out how to display all comments related to a specific listing on an online auction site. Can anyone help me find a solution for this? Models.py class Listing(models.Model): title = m ...

The background color feature of a div is malfunctioning

I have encountered a strange issue with one of my Div elements. When I add text inside the div, the background color sticks to the text. However, if there is no text present, the background color disappears. Image with Text: https://i.stack.imgur.com/oYK ...

Tips for populating a textfield with data from a <select> dropdown using javascript

Is there a way to populate a textfield with data automatically based on information provided in the tab, utilizing JavaScript? Additionally, is it possible to prevent the filled data from being edited? The textfield should be able to dynamically fill data ...

The CSS popup box fails to reset its data after being closed, and the closure button does not effectively close the popup

I am having an issue with a login popup on my website. Whenever I fill in the login or registration information and then close the popup, the next time I open it, the input box still contains the previous data. How can I reset the popup to always open with ...

Problem with displaying Django input fieldsSolution for missing Django input

Currently, I am in the process of constructing a website using Django. One of my tasks involves transferring input from index.html to about.html through view.py. However, despite successfully passing the input as seen in the URL in the browser's addre ...

The incorporation of SVG within a span disrupts the conventional left-to-right arrangement of its child elements

As I was working with some basic HTML, I encountered an issue. <span> <span>Hello</span> <span>World</span> </span> The above code displays: Hello World However, when I tried adding an SVG element like this: <s ...

A solution for optimizing accessibility by concealing anchor outlines in Internet Explorer and Firefox

Initially, I want to clarify that I acknowledge the fact that removing outlines impairs keyboard navigation. In contrast to Internet Explorer and Firefox, Google Chrome handles this issue by displaying outlines exclusively when the user interacts with the ...

What could be hindering the activation of my button click event?

Below is the js file I am currently working with: var ButtonMaximizer = { setup: function () { $(this).click(function(){ console.log("The maximize button was clicked!"); }); } }; $(docum ...

Is there a way to load and play different sounds on multiple audio players based on the length of an array?

I am attempting to load various sounds (.mp3 audio) on separate audio players that are displayed on a single HTML page. The number of players displayed on the screen is determined by the length of the array. In this specific example, I have 3 elements in t ...

Enhancing a variable's value while simultaneously boosting its rate of increase through Javascript

Looking to adjust the timing on a number increase function using setInterval(Function, time). Initially set the variable for time as time = 1000, but now looking to dynamically change it by implementing a function triggered by a button click: function cha ...

Executing two jQuery scripts simultaneously on one page

Struggling to use 2 jQuery objects simultaneously on the same page. Can't get them both working at once despite playing around with the code. I'm new to this, so any help would be greatly appreciated. The code in the head section looks like this ...