Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member tatoskinz's Avatar
    Join Date
    Dec 2007
    Posts
    1
    Member #
    16230
    Like most guys I refuse to beg for help unless I'm completely marooned..And I am, totaly befuddled on how to position an image in the absolute top left and including a anchor link..
    I did get the image up there properly using backgound declaration in my external style sheet and it looks dandy all snug flush with the border of my browser window, but I cannot create a link out of it..Help!

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Depends on how you went about this.

    If you gave a class or an id the image via css then I do not think you can have the whole image as a link.

    However if you wrap an <img> in <a></a> you should get your desired effect.

    HTML Code:
    <html>
    
    <head>
    
    <title>Image position</title>
    
    <style type="text/css">
    body
     {
    	margin-left: 0px;
    	margin-top: 0px;
     }
    </style>
    
    </head>
    
    <body>
    
    	<div><a href="http://www.google.co.uk"><img src="example.jpg" width="89" height="107" /></a></div>
    
    </body>
    </html>

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    So you put your image as a background and was able to make it anchor?

    Now, use a transparent .gif (a blank image) on top of your background image,
    making the .gif exactly the same size ... and that image becomes the link.

    Create a .gif that is 1x1 pixel (white in color). Save as .gif and make "white"
    the transparent color .... name it "blank.gif"

    Then, if your background image is 100X100, display it like you want and
    put this over the top of the background ...

    <a href="mylink"><img src="blank.gif" width="100" height="100" border="0" alt="" /></a>

    ==========

    I didn't try what Bfsog mentioned ... try that too. Using <div> is probably the
    correct method to use ... I just think the transparent .gif is easier to use.


  5. #4
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    or what you may go about it this way

    <a href="www.yoursite.html" class="img1" >text here</a>

    a.img1 {

    background-image:url("image.jpg");

    background-position: 0px 0px;

    position:absolute;

    width: 100px;

    height:100px;

    display:block;


    }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com