Title: background image header
Last modified: April 13, 2017

---

# background image header

 *  [webamies](https://wordpress.org/support/users/webamies/)
 * (@webamies)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/background-image-header/)
 * _[ Moderator note: [moved to Fixing WordPress](https://wordpress.org/support/topic/wheres-my-topic-gone?replies=1&view=all).]_
 * Good Morning,
    I want to insert the header function in my page with background
   image to a div. Since yesterday I did not get it. The image comes out of my text
   and I want it to come out on the bottom of my div
 *     ```
        <!-- TOP-HEADER -->
               <header>
        <?php 
               $header_image = get_header_image();
               if ( ! empty( $header_image ) ) { ?>
   
                   <div id="hacienda-header" > <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo get_bloginfo( 'name' ); ?>" />
       </div>
       </header>
       ```
   
    -  This topic was modified 9 years, 1 month ago by [webamies](https://wordpress.org/support/users/webamies/).
    -  This topic was modified 9 years, 1 month ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [webamies](https://wordpress.org/support/users/webamies/)
 * (@webamies)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/background-image-header/#post-9026074)
 * resolved!!!
 *     ```
       <!-- TOP-HEADER -->
               <header>
        <?php 
               $header_image = get_header_image();
               if ( ! empty( $header_image ) ) { ?>
   
                   <div id="hacienda-header" style="background-image:url(<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo get_bloginfo( 'name' ); ?>)" />
       </div> </header>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘background image header’ is closed to new replies.

## Tags

 * ["background-image"](https://wordpress.org/support/topic-tag/background-image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [webamies](https://wordpress.org/support/users/webamies/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/background-image-header/#post-9026074)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
