Ways to center items within a column using Bootstrap

I'm working on a React project with Bootstrap and I'm trying to align the contents of my second column to the bottom. However, everything I've tried so far hasn't been successful. I've seen others achieve this layout but for some reason, I can't change the alignment within the columns.

Specifically, I want the 'nav' element to be positioned at the bottom of its containing column, but it's currently appearing at the top left instead.

<div className="pageHeader">
    <div className="container-fluid">
        <div className="row">
            <div className="col-md-3 col-sm-12">
                <Logo currentPage='marine' />
            </div>
            <div className="col-md-9 col-sm-12 align-items-bottom">
                <nav className="navigationBar">
                    <div className="navbarDiv">
                        <ul id="navmenu" class="navmenu">
                            {
                                headerObject.buttonDataArray.map((button, index) => {
                                    return (
                                        <NavButton key={index} buttonData={button} />
                                    )
                                })
                            }
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
    </div>
</div>

Answer №1

Consider using the "d-flex align-items-end" class

<div className="pageHeader">
    <div className="container-fluid">
        <div className="row">
            <div className="col-md-3 col-sm-12">
                <Logo currentPage='marine' />
            </div>
            <div className="col-md-9 col-sm-12 d-flex align-items-end">
                <nav className="navigationBar">
                    <div className="navbarDiv">
                        <ul id="navmenu" class="navmenu">
                            {
                                headerObject.buttonDataArray.map((button, index) => {
                                    return (
                                        <NavButton key={index} buttonData={button} />
                                    )
                                })
                            }
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
    </div>
</div>

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

Can you provide instructions on creating a small border at the center of an h1 heading?

What is the best way to create a small border in the center of an h1 text element? ...

Auto play feature malfunctioning in Onsen-UI Carousel attribute settings

When utilizing onsen UI in my mobile web application, I encountered an issue with the autoplay property not functioning properly within the carousel. <ons-page> <ons-toolbar> <div class="left"> <ons-toolbar-button on ...

Getting rid of unnecessary compiled CSS files in Compass

After making changes to files and running compass compile, the compiled files remain even if they are renamed or deleted. Similarly, compass clean does not remove these old files as it only focuses on cleaning up current files in use. I want to avoid compl ...

Utilizing jQuery to Calculate Tab Scores

Last week, my teacher and I collaborated on a fun game called rEAndom game (). The game is created using javascript, jQuery, and HTML5. One interesting feature of the game is that when you press the TAB key, a div displaying the score appears. You can chec ...

Enable the choice for Bootstrap collapse animation to be customized

Is there a way to allow users or admins on my website to decide whether or not Bootstrap 4 collapse elements should be animated? The concern is that when many elements are moved by the animation, it becomes less smooth. Therefore, it would be ideal to give ...

Converting String API Data into Objects

After retrieving data from an open source API, I am facing an issue with displaying the data in a string format. Should I convert it into an object and create a list to access the data individually? Or is there an error in my code causing this issue? The ...

Having trouble getting the styles property to work in the component metadata in Angular 2?

Exploring Angular 2 and working on a demo app where I'm trying to apply the styles property within the component metadata to customize all labels in contact.component.html. I attempted to implement styles: ['label { font-weight: bold;color:red } ...

Is there a problem with Framer Motion exit and AnimatePresence in Next.js?

Why isn't my exit prop or AnimatePresence working as expected? This is my custom variant: const imgVariant = { initial: { opacity: 0, y: -100, }, animate: { opacity: 1, y: 0, transition: { type: " ...

Update the reference of the 'this' keyword after importing the file

I am currently utilizing react-table to showcase the data. My intention is to house my table columns outside of the react component due to its size and for reusability purposes. I created a table configuration file to contain all of my table configurations ...

Moving specified data from one interactive table to another interactive table

In my setup, there are two tables - one for products and another for customers: <table cellpadding="0" cellspacing="0"> <thead> <tr> <th>Product Code</th> </tr> </thead> ...

What is the best way to adjust the size of a toggle button

My HTML page is equipped with a toggle button that has its own CSS properties, but I am facing an issue where the size and length of the toggle button are not aligning with the initial position set. https://i.sstatic.net/HVFY8.png Upon toggling the butto ...

Is my JSON data causing the error of invalid React child components?

Although this question has been asked multiple times on Stack Overflow, the solutions provided have not worked for me. My main goal is to retrieve notifications from a JSON file located here: I suspect that my JSON file may be poorly structured, especial ...

Add the Load More feature to your Next JS project for enhanced user experience

Utilizing the SWR package along with Next JS, I have successfully retrieved data and displayed it in a table. Now, my goal is to implement a "load more" type of pagination for the listing page. Below is the code snippet: Locations component: import useSW ...

React application not creating the necessary public and src directories

When running npx create-react-app myest, the public and src folders are not being generated in my React project. I attempted to fix this issue by first uninstalling the global create-react-app package using npm uninstall -g create-react-app, and then rein ...

Attempting to send a request from the front-end to the back-end is resulting in a 404 endpoint error

I encountered an issue while sending a post request from the front end to the backend. The error message I received was: " Error: Request failed with status code 404 " " Had Issues POSTing to the backend, endpoint " My main concern is ...

What are some other options to using position: absolute when working within an inline position:relative?

I've been struggling with this problem for some time now and just can't seem to find a solution. The issue involves a series of position: relative spans enclosing text, along with a position: absolute span set to right: 0;. I expected the second ...

What is the proper way to utilize xpath for locating an element that has two specific descendants?

I'm faced with a challenge involving an unordered list of dynamically generated list items, each containing labels and values. My goal is to validate that the list includes a specific label with a specific value. I'm grappling with crafting an x ...

Leveraging the ng-hide property of one controller to adjust the ng-style attribute of another controller through a centralized global controller

Seeking assistance with accessing the boolean value of ng-hide from one controller in order to alter CSS properties of another controller utilizing a global controller. Here is the jsfiddle link: https://jsfiddle.net/dqmtLxnt/ HTML <div ng-controller= ...

What are the steps to fix the "Invariant Violation" issue that is linked to the redux store?

During my DOM testing to verify if a dialog box would open upon clicking a button, I encountered an error message: Invariant Violation: Could not find "store" in either the context or props of >"Connect(Photos)". Either wrap the root component in a , ...

Does Div have the capability for text-shadow?

Is there a way to create a shadow effect for DIVs similar to the text-shadow property? While text-shadow is great for adding shadows to individual pieces of text, I'm interested in applying a shadow effect to an entire DIV element. Does anyone have a ...