jumbotron with centered text on the left and image on the right

13,999

This worked for me:

<div class="jumbotron">
    <div class="container">
        <div class="row">
            <div class="col-md-6">
                <h1>Big Test</h1>
                <h2>Little Test</h2>
            </div>
            <div class="col-md-6">
                <img src="img.jpg" />
            </div>
        </div>
      </div>
</div>
Share:
13,999

Related videos on Youtube

Warrick FitzGerald
Author by

Warrick FitzGerald

Updated on September 15, 2022

Comments

  • Warrick FitzGerald
    Warrick FitzGerald over 1 year

    I'm trying to vertically and Horizontally center the list-group to the left of the image in the below code.

            <div class="jumbotron">
                <div class="row">
                    <div class="col-lg-6">
                        <ul class="list-group center-list">
                            <li class="list-group-item">something here</li>
                            <li class="list-group-item">something here</li>
                            <li class="list-group-item">something here</li>
                        </ul>
                    </div>                              
                    <div class="col-lg-6">
                        <img src="images/ModelBack.png" class="pull-right">
                    </div>               
                </div>
    

    I created the center-list class and have tried following a number of examples with similar questions, but my CSS is apparently lacking.

  • Teo Knežević
    Teo Knežević about 9 years
    if you are having problem with image width, just add it a class and put width 100%, it will be 100% width of you col