Adding a Hyperlink to a <div> code

Discussion in 'HTML & Website Design' started by epic1231, Jul 22, 2006.

  1. #1
    I know this is most likely easier then I am making it but I have a script (it's a premade template), that has an image that is set as a background, and I can't figure out how to make it a hyperlink -- in the file it actually doesn't appear to me to even call the image via the source but apperently it does since it works on the website.

    The code is below..

    
    	<div id="headerBanner">
    		<div id="bigBanner">
    			<a target="_blank" href="URL GOES HERE"><img src="_banners/bigBanner1.png" alt="" /></a>
    		</div>
    		<div id="smallBanner">
    		</a>
    		</div>
    
    Code (markup):
    If you notice the bigbanner works just fine - yet the smallbanner I want to have a link for that also but I can't figure it out - I tried to add in

    
    <a target="_blank" href="URL GOES HERE"><img src="_banners/smallBanner1.png" alt="" /></a>
    
    Code (markup):
    but it did not work, anyone have any suggestions?

    Thanks in advance,
    Bill
     
    epic1231, Jul 22, 2006 IP
  2. slickricky

    slickricky Active Member

    Messages:
    240
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Without seeing the webpage, I'm assuming that what you're looking at is a background image, that is called through css. If you use a transparent gif and size it to the full size of the banner you should be able to make it link, and the background will show through.
     
    slickricky, Jul 24, 2006 IP
  3. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe this can help if I undestood your question:

    #bigBanner a {
       display:block;
    }
    Code (markup):
    Boby
     
    Boby, Jul 24, 2006 IP
  4. epic1231

    epic1231 Peon

    Messages:
    680
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I got it thanks guys for the reply though i appreciate it :)
     
    epic1231, Jul 26, 2006 IP