• I am trying to make my logo clickable and link back to the home page. This is my code is:

    PHP CODE:

    <div id="header">
    	<div id="logo" onclick="winddow.location.href='https://localhost:8888/home/';" style="cursor: pointer;"></div>
    	<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    	<?php bloginfo('description'); ?>
    </div>

    CSS CODE:

    #logo {
    	position: absolute;
    	margin-top:25px;
    	background: url(images/logo.png) no-repeat;
    	width: 125px;
    	height:313px;
    }
    
    #logo img {
    	border:none;
    }

    FYI- I am testing locally so I cannot provide a physical link to the site. I am still fairly new to WP. Any assistance would be greatly appreciated… the more detailed the better =) Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would make the following changes:

    <div id="header">
    	<div id="logo"><a href="https://localhost:8888/home/"><?php bloginfo('name'); ?></a>
    	<?php bloginfo('description'); ?>
    </div>

    Then in the CSS:

    #logo a {
    	position: absolute;
    	margin-top:25px;
    	background: url(images/logo.png) no-repeat;
    	width: 125px;
    	height:313px;
            border:none;
    }

    You could also test it with border:1px solid red; just so that you can see exactly what’s going on.

    Thread Starter Mamikei

    (@mamikei)

    Thank you for the suggestion… but it didn’t work. It actually broke my sticky footer. I am still open to suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Logo image is not clickable’ is closed to new replies.