Skip to content

Instantly share code, notes, and snippets.

@kontikidigital
Last active April 29, 2017 16:46
Show Gist options
  • Save kontikidigital/343494dcdef6234fa937 to your computer and use it in GitHub Desktop.
Save kontikidigital/343494dcdef6234fa937 to your computer and use it in GitHub Desktop.
Center header image logo in Genesis
<?php
//* Do NOT include the opening php tag
//* Paste this code in your Genesis Child Theme functions.php
/* Header
---------------------------------------------------------------------------------------------------- */
/* Remove Header Widget Area for centered logo
--------------------------------------------- */
unregister_sidebar( 'header-right' );
/* Site Header
---------------------------------------------------------------------------------------------------- */
.title-area {
float: left;
padding: 2px 0;
width: 100%; /*320px; Modified for centered logo*/
}
/* ## Widget Area
--------------------------------------------- */
.site-header .widget-area {
float: right;
text-align: right;
width: 0px; /*800px; Modified for centered logo*/
margin-top: 1.5rem;
}
/* Navigation Header
---------------------------------------------------------------------------------------------------- */
.header-image .site-title > a {
background: url(images/logo.png) no-repeat left;
background-position: center; /*centered logo*/
float: left;
min-height: 120px;
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment