Aligning text in a div with bootstrap

Trying to get the hang of Bootstrap and its grid system. Here's my attempt at creating a footer using only some of the columns available. I'm having trouble centering the list items within the div, despite styling the elements. Can't figure out why it's not working even after tinkering with Google dev tools.

.wrapper{
    width:80%;
    margin:0 auto;
}
.footer{
    margin:0 auto;
    text-align:center;
}

HTML

  <div class="row footer">
            <div class="wrapper clearfix">
                <div class="col-md-2 ">
                    <ul>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                    </ul>
                </div>
                <div class="col-md-2">
                    <ul>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                    </ul>
                </div>
                <div class="col-md-2">
                    <ul>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                    </ul>
                </div>
                <div class="col-md-2">
                    <ul>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                        <li>Bob</li>
                    </ul>
                </div>
            </div>
        </div>

Answer №1

try this out

.footer ul {
  display: grid;
  justify-content: center;
}

example

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 attempt to remove the ajax-loaded page while preserving the original div is proving to be

I have a function that is triggered when a link is clicked. This function uses ajax to load a new page over a div. <pre><code> function displayContent(id) { loadPage_signup = "register.php"; loadPage_info = "userinfo.php"; $.aj ...

Is ffmpeg-php required for utilizing ffmpeg?

Currently exploring the process of coding a website for uploading, converting, and playing videos. My ability lies in PHP programming. In order to use ffmpeg on my server, I am wondering whether it is necessary to also install and utilize ffmpeg-php. Any ...

Transform - change the data type of the input from text to number

My issue is that I need Deform to render an input type number in a specific way: <input type="number" name="end" value="" id="deformField4" class=" form-control "> Instead of rendering it as: <input type="text" name="end" value="" id="deformF ...

I'm looking for a way to conceal the final node in a tree structure using CSS

I have a tree structure created using html and css. I am trying to hide the last node in the tree using the following css code: div ul li ul li ul li ul.treeview{ display: none; } However, it doesn't seem to be working. Can anyone spot what ...

The radio button in the HTML form is disabled when the user selects

I have two radio buttons labeled Billable "Y" and Billable "N". These radio buttons are linked to a database with corresponding values of "Y" or "N". If the user selects "Y" using the radio button, then the NonBillableReason text box should be disabled. ...

How to Build a Custom Toolbar with Left and Right Aligned Elements using React.js and Material UI

Struggling with updating the toolbar on my website. Wanting the site name and logo on the left side, while login/sign-up buttons fixed to the right. Logo and title are in place, but can't get buttons to stay on right margin. Here's the code: func ...

How can you Use CSS to Float Elements Left and Right while adjusting their Width Dynam

Is it possible to have two columns side by side with dynamic text using only CSS? I'm trying to make the left main text "break" into a new line when it reaches the right category, which is also dynamic. Do I need to use JavaScript for this? https://i ...

Looking for a solution to fix the VueJS calculator that only works once?

My calculator project using VueJS, HTML and CSS is almost complete. However, I'm facing an issue where it only works once. For example, if I input 6x3, it correctly gives me 18. But if I then clear the result and try to input a new calculation like 3 ...

Tips for adjusting the width of table columns when dealing with browser fields

When working with a table field, I am allowing input as a file. <table> <tr> <th> <input type="file" name="icon" id="icon" /> </th> </tr> </table> The file input field is recommended to have a width of 242-246px ...

Optimizing loading times for mobile banners through media queries

I currently have a standard size banner that loads when my page is accessed on a computer. However, I would like to optimize the loading speed by having a smaller version specifically for mobile devices using a media query. My main question is how does t ...

Creating an image dynamically at runtime from a section of HTML code as it appears in the browser

Is there a way to use Java API or Jquery library to create an image from input HTML code? Alternatively, how can I capture a screenshot of a section of HTML code as it appears in the browser? For example: If I have the following HTML code: <h1>Logo& ...

Preventing placeholder from reverting back on transition (CSS)

My goal was to create an input field with a transition effect on the placeholder text. To achieve this, I utilized a <span> tag to hold the placeholder and applied a transition using the :focus CSS selector. The implementation works smoothly, but the ...

Creating borders for two columns as a complete unit in Bootstrap 3

To see a preview of my codes, take a look here (on Bootply). This is how the HTML section appears: <div class="container"> <div class="row"> <a href="#a"> <div class="my-border"> <div class="col-md-3">A&l ...

Pedestrian crossing Cordova experiences delayed response despite ontouchstart attempts to fix it

I have been experiencing a delay issue when using a CSS button with the ":active" pseudo-class on my phone. Every time I click the buttons, there is a noticeable delay before entering the active phase. Here is my CSS code: .btn {...} .btn:active{...} To ...

Using the explode function to parse an XML file and extract the data into a unified array output

My XML file can be found here. I am currently parsing it using the following code: <?php $xml=simplexml_load_file('info.xml'); foreach($xml->testcase as $var){ $var=explode('/',$var->script); $module =array($var[2]) ...

Creating a dropdown in HTML that overlaps another div requires using relative and absolute positioning

Having created a navigation bar with dropdown menu items that reveal on hover, I encountered an issue. Below the navigation bar lies a slideshow of images. Whenever I hover over the dropdowns, the slideshow div obstructs the view, making it impossible to s ...

Learn the process of utilizing Javascript to substitute additional texts with (...) in your content

I am facing a challenge with a text field that allows users to input text. I want to use JavaScript to retrieve the text from the textbox and display it in a paragraph. However, my issue is that I have set a character limit of 50. If a user exceeds this li ...

What is the best way to apply a class to a container when a component in AngularJS receives focus or is clicked?

I am trying to apply a class to the container when either the input field is focused or when the dropdown component receives focus or is clicked. The class should be removed when the focus is lost. The requirement is for the input container to have the &a ...

Steps for loading a new page by clicking an input button:

I'm looking for some help with a basic issue I'm having while customizing a WordPress plugin. I want to redirect the user to the thankyou.php page when they click on the place_order button. I tried changing the input value to thankyou.php, but it ...

Encountering difficulty with installing sass

I recently attempted to install node-sass and, while the installation was successful, I encountered an issue where the code in main.scss was not automatically transferred to style.css. In an attempt to resolve this issue, I deleted all related files incl ...