Results 1 to 2 of 2

Thread: Help needed header to have href link

  1. #1
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Help needed header to have href link

    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:
    HTML Code:
    <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:
    Code:
    div.headerobject
    {
       display: block;
       left: 0;
       margin-left: 0;
       position: absolute;
       top: 0;
       width: 165px;
       height: 140px;
       background-image: url('images/header-object.png');

  2. #2
    Join Date
    Jan 2012
    Location
    India
    Posts
    45
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default

    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>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •