SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Linking a DIV?

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Linking a DIV?

    Is it possible to link an entire DIV?

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,624
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, since you gave the image as a background image you can't link that. Your best option here would be to absolutely overlay an anchor (note, inline styles used as demo ONLY)
    Code:
    <div id="homeRight" >
    	<div id="welcomeMessage" style="background: #f7f4e5 url('http://customghanahomes.com/wp-content/themes/Buchan/images/2_callout_btn_realtor_thumb.jpg') bottom right no-repeat;">
    
     
    
    
    		<h2 id="homeWelcome"><a href="http://customghanahomes.com/2010/01/hello-world/">Welcome Home!</a></h2>
    
    <p>A home should be more than the sum of its parts, it is a structure that contains and shapes a family’s life. This extraordinary combination shapes how we build your home…</p>
    <p>We build for the sophisticated and discriminating home buyer…who appreciates functionality, simplicity, practicality</p>
    <p>We don’t just add a home to your life…&#160;We add a life to your home.</p>
    				
            	
    				
    		
    		
            
    
            
    <a style="position:absolute;height:100&#37;;top:0;right:0;width:200px;z-index:9" href="#"></a>
    		
    		<div class="clear"></div>
    		
    	</div>
    I think that's wide enough to cover the whole image, if not then just increase/decrease the width of the anchor to whatever you want .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a great fix! Thank you very much. I was just thinking of making the div a link.

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,624
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You're welcome .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


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
  •