Log in

View Full Version : Help needed header to have href link



unoimgr8st
01-29-2012, 06:30 AM
Hi,
My problem is that i'm using the logo url in CSS, however can't get the logo to link to index.html
Similar question was answered earlier in this forum but its solution is to use the <div> inside the anchor <a>, however when i used this method - it makes the whole header to link to index.html and not the logo -
I'm using <a> at the start of this code from here coz if i used before the logo header object where i want i.e., <a href=index.html"<div class="headerobject"></div></a> it still doesn't link.

Your help is much appreciated.

This is my html coding:


<div id="main">
<div class="cleared reset-box"></div>
<div class="header">
<div class="header-position">
<div class="header-wrapper">
<div class="cleared reset-box"></div>
<div class="header-inner">
<div class="headerobject"></div>
<div class="logo">
<h1 class="logo-name"><a href="./index.html">Title</a></h1>
<h2 class="logo-text"> subtitle</h2>
</div>
</div>
</div>
</div>

<div class="bar nav">
<div class="nav-outer">
<div class="nav-wrapper">
<div class="nav-inner">
<ul class="hmenu">
<li>
<a href="./index.html" class="active">Home</a>
</li>
<li>
<a href="./services.html">Services</a>
</li>
<li>
<a href="./pricing.html">Pricing</a>
</li>
<li>
<a href="./about-us.html">About Us</a>
</li>
<li>
<a href="./contact.html">Contact Us</a>
</li>
</ul>
</div>
</div>
</div>
</div>


This is my CSS coding:


div.headerobject
{
display: block;
left: 0;
margin-left: 0;
position: absolute;
top: 0;
width: 165px;
height: 140px;
background-image: url('images/header-object.png');

ankush
01-30-2012, 05:23 AM
not getting you, what do you want to do exactly but i think you want to link a image to your index.html file but you can't link a background image, insert a static image and you can link that like

<a href="index.html"><img src="yourimagename.jpg" /></a>