PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, September 30, 2022

[FIXED] How to align contents inside a column in Bootstrap?

 September 30, 2022     bootstrap-5, css, html, reactjs, twitter-bootstrap     No comments   

Issue

I'm using React with Bootstrap. I want to lay the contents of the second the column on the bottom of column. But what i've tried so far is not seem to be working. What's the problem here ? I saw people doing the same thing and get the results but i can't change the alignment of the contents inside columns.

Basically i want 'nav' element to lay on the bottom of the column it's being inside of. But it keeps laying on the top left of the column.

<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>

Solution

Try "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>


Answered By - IT goldman
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing