sharls
sharls

Reputation: 89

Image doesn't get centered all the way

Logo image is floating about 20% to the left. Where did i go wrong?

<div class="container">
<div class="header" id="hd">
<header>
<div class="row">
<div class="span12 pagination-centered">
<a href="<?php echo get_settings('home'); ?>"><img src="http://www.blabla.com/wp-content/themes/lawyer/images/logo.png"></a></div>
</div>

.container {width: 100%;}
#hd {
background-color: #405160;
}
#lg {
margin: 0 auto;
position: relative;
}

Upvotes: 0

Views: 47

Answers (2)

Krunal Shah
Krunal Shah

Reputation: 2101

try below code with attached css classes.

.row:before, .row:after { content: ""; display: table; line-height: 0; }

.row:after { clear: both; }

.logo { padding-top: 10px; }

    <div class="row">
      <div class="logo">
        <a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" alt=""></a>
      </div>
    </div>

Thanks.

Upvotes: 0

sharls
sharls

Reputation: 89

Just made all the rows fluid, and it aligned perfectly

Upvotes: 1

Related Questions