WordPress.org

Forums

[resolved] Help Centering Homepage Logo, Please. (2 posts)

  1. sdari
    Member
    Posted 2 years ago #

    I've tried and am trying but still nothing.
    I'm working on a news site, us.indianexaminer.com and am trying to center the logo 'The American Examiner' in the center. I've changed code in my header.php and the style.css but the logo just wont budge from the right.

    There was a search box and space for a banner ad in the right, which I don't need, so I deleted the code, but the logo still won't center.

    I know I'm missing something. Any ideas?

    Here's my existing header.php code -

    <div id="header">
    
     		<!-- Logo -->
    		<div id="logo">
    			<a href="<?php echo get_option('home'); ?>/"><?php if ($wpzoom_misc_logo_path) { ?><img src="<?php echo "$wpzoom_misc_logo_path";?>" alt="<?php bloginfo('name'); ?>" /><?php } else { ?><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" /><?php } ?></a>
    		</div>
    
    		<div id="righthead">
    
    			<!-- 468x60 banner code -->
    			<div class="banner banner-head">&nbsp;
    				<?php if (strlen($wpzoom_ad_head_imgpath) > 1 && $wpzoom_ad_head_select == 'Yes') {?>
    					 <?php if (strlen($wpzoom_ad_head_imgpath) > 1) { echo stripslashes($wpzoom_ad_head_imgpath); }?>
    				<?php } ?>
    			</div>
    
    			<!-- Search Form -->
    			<div id="search">
    			  <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    			</div>
    
    		</div> 
    
    	</div> <!-- end header -->

    And here's the corresponding style.css code -

    #header
    {
    padding-top:20px;
    float:left;
    }
    
    #header .banner-head {
    float: right;
    display: inline;
    margin-bottom: 10px;
    height:60px;
    width:500px;
    text-align:right;
    }
    
    #righthead {
    float:right;
    width:480px;
    }
    
    #logo
    {
    float:left;
    width:490px;
    margin-top:50px;
    }
    
    #logo h1 a
    {
    color:#BFB5B5;
    font-family:Rockwell,"Times New Roman",Times,serif;
    font-size:35px;
    font-weight:700;
    }
    
    #logo h2
    {
    color:#BFB5B5;
    font-size:14px;
    font-weight:bold;
    }
  2. sdari
    Member
    Posted 2 years ago #

    Figured it out. Just needed to set the margins to auto. If anyone needs help with theirs, let me know.

Topic Closed

This topic has been closed to new replies.

About this Topic