Andi Wilkinson
Andi Wilkinson

Reputation: 662

Centering the image in navbar-header / navbar-brand

This is my first use of bootstrap & i am using the roots theme as a barebones template. I have placed an image within the navbar-header element in the header-top-navbar.php I also placed it in a div and changed the div class to 'navbar-header' as opposed to the

as shown below.

<div class="navbar-brand"> <a href="<?php echo home_url(); ?>/"><img class="img-responsive" src="<?php echo get_theme_root_uri(); ?>/choir/assets/img/harmonics_logo.png"/></a></div>

I have no idea how to get this to be central to the page. it's within another div of navbar-header, I have tried float:none and margin: 0 auto; on both to no avail.

any suggestions would be appreciated.

be gentle i's my first post.

Upvotes: 1

Views: 1334

Answers (1)

Falguni Panchal
Falguni Panchal

Reputation: 8981

Like this

demo

css

.navbar-brand{
    border:1px solid red;
    text-align:center;
}

Upvotes: 1

Related Questions