Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need some help very basic

    Hi i am new here would like some help I have just taken own a web site and I am getting to grips from most of it but iv got to try to add a link to a .png I have the PNG displaying and the link there but its just very small.


    its at www.emphosts.com Top left of the page. cashloopholes link

    If u notice at the end of the word cash the link is there but very small.

    I have the css style sheet.

    }
    #logo {
    background:url(../images/logo.png) no-repeat;
    width:467px;
    height:52px;
    float:left;
    margin:35px 0 0 20px;
    }
    Then the HTML .tpl

    <div id="logo">"><a href="http://www.gadsx.co.uk/forum.php">&nbsp;</a></div>
    with www.gadsx.co.uk as the link url

    why is the link so small how can i change this could some one show me some correct coding

  • #2
    Regular Coder
    Join Date
    Apr 2010
    Location
    Somerset,UK
    Posts
    138
    Thanks
    10
    Thanked 1 Time in 1 Post
    I suspect that the link is so small cause you have linked the &nbsp; where you want to link the image itself.

    I'd it were me I would place the image in the div and link that.

    Code:
    <div id="logo>
        <a href="http://www.gadsx.co.uk/forum.php"><img src="images/logo.png" alt="logo" height="52" width="467" /></a>
    </div>
    That will make the whole image a link. Take out the background image from the CSS.
    I'm still learning so you maybe able to link the image in CSS but I'm not sure.

    Hope that helps anyway!
    (excuse any typos,really shouldn't do replies on iPhone!)
    Hmmmm......scratchy head time......

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,451
    Thanks
    17
    Thanked 275 Times in 275 Posts
    Code:
    <div id="logo" onclick="window.open('http://www.gadsx.co.uk/forum.php','')"></div>
    Will open the link in a new window. You can add a target attribute to get it to open in the same window.


  •  

    Posting Permissions

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