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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Frame + link problem... need advice

    Hi... I've just started playing around with page design in html, so if this question doesn't belong in this area please don't crucify me... I just need to be pointed in the right direction

    I've built a page which is split into two columns, the first of which is around 28% of the width of the page. This first column has been divided into four even rows. This is going to be my menu bar.
    What I want to happen is for each of the rows in my menu bar to be comprised fully of an image, and for this image to be the link. So... you click on any spot of the image and a new window will open in the second column.
    I've worked out how to get the image in the row (as a background, no resize, no scrolling etc) and I know how to make the link open in the main window, but I cannot work out how to make the image itself a link.
    Is it possible? if so... can anyone give me some advice or point me at a resource that will shed some light? I would be very appreciative :-)

  • #2
    New Coder
    Join Date
    Dec 2005
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just do as for normal links
    PHP Code:
    <a href="yourpage.html" target="_blank" " alt="www.yourpage.co.uk">
    <img src="
    yourpic.jpg " >
    </a> 
    if you want it to open in second column, assuming 2nd colum is iframe just put name of iframe in target bit

  • #3
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Actually The alt attribute belongs in the image tag not the anchor tag like this.

    <a href="yourpage.html" target="_blank">
    <img src="yourpic.jpg " alt="www.yourpage.co.uk">
    </a>

  • #4
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, the alt attribute is meant for setting ALTernative text, if the browser is set to not show images (or can't support them etc).

    A better method though would be to include the title attribute on the anchor and use the alt attribute to describe the image.


  •  

    Posting Permissions

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