Forums

How do I Make the header image a link to my main page? (4 posts)

  1. varrka
    Member
    Posted 3 months ago #

    Is there a way to make the image in the header file a link without making all website clickable. Well what i did is i add to my header image images/top.jpg :

    onclick="location.href='<?php bloginfo('url');?>';" style="cursor:pointer;"> but for same reasons all website is clickable/link to the main page.

    The code in header.php is

    [code moderated - please use the pastebin]

    Code in css is

    #main { width:766px; margin:0 auto; background:url(images/side-tall.gif) repeat-y left; border:2px #3D3D3D solid; border-top:0; border-bottom:0;}
    
    #main .top { background:url(images/top.jpg) no-repeat top;}
    #main .bot { background:url(images/side-bot.gif) no-repeat bottom left;}
    
    #header { height:14px;}
    
    #logo {margin:4px 0 0 46px; position:absolute;}

    [please don't bump]

  2. alchymyth
    The Sweeper
    Posted 3 months ago #

    try to move your code to the <div id="header">

  3. varrka
    Member
    Posted 3 months ago #

    <body>
    	<div id="main">
                     <div class="top" onclick="location.href='<?php bloginfo('url');?>';" style="cursor:pointer;">
    			<div class="bot">
    				<!--header -->
                                        <div id="header">
    					<div id="logo">
    						<h1><a href="<?php echo get_settings('home'); ?>/" ><?php bloginfo('name');
  4. varrka
    Member
    Posted 3 months ago #

    @ alchymyth, its not working in header. Thanks anyway.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.