WordPress.org

Ready to get started?Download WordPress

Forums

Whole header is clickable, instead of image only (4 posts)

  1. Prti
    Member
    Posted 3 months ago #

    I want only the image(logo) in my header to be clickable, but i can also click left and right of it. The nav menu works as it should.

    The code of header:

    <div class="head">
         <a href="<?php bloginfo('url'); ?>/novice"><img src="<?php bloginfo('template_directory'); ?>/pcs/logo.png" class="logo" align="middle" alt="LOGO"/></a>
         <?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
    </div>

    CSS:

    .head{
        padding-bottom: 30px;
    }
    
    .logo{
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom:53px;
    }

    Note: the margin-bottom is not clickable

    I also tried to assign width to <a> tag, but that didnt work.

    Any ideas?

  2. DJDoubleXL189
    Member
    Posted 3 months ago #

    Got a URL to look at?

  3. graphical_force
    Member
    Posted 3 months ago #

    Can you post a link to your site so we can see this?

  4. Prti
    Member
    Posted 3 months ago #

Reply

You must log in to post.

About this Topic