• [ Moderator note: moved to Fixing WordPress. ]

    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.
    • This topic was modified 9 years, 1 month ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
  • Thread Starter webamies

    (@webamies)

    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.