WordPress.org

Ready to get started?Download WordPress

Forums

Headerimage next to title (6 posts)

  1. madsrh123
    Member
    Posted 1 year ago #

    Hi

    Can anyone tell me how I can place the header image in the top left with the title next to it ?

    This is what I've got:

    <hgroup>
    <?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		</hgroup>

    I've tried adding a float:right to the css, but it's not working :-(

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    What theme are you using? Where did you download it from?

  3. madsrh123
    Member
    Posted 1 year ago #

    Sorry, I forgot to write it in the post. It's TwentyTwelve

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Do not edit the Twenty Twelve theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  5. madsrh123
    Member
    Posted 1 year ago #

    Yes, I know :-D It's inside the header.php of the child theme.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. Or use whatever developer tool is available in your web browser.

Topic Closed

This topic has been closed to new replies.

About this Topic