Results 1 to 3 of 3

Thread: images overlay

  1. #1
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default images overlay

    Dear all,

    MWINTER gave me the following CSS code to overlay hyperlink images onto a background - can someone see which attributes define the position of the overlayed images?

    Thanks
    Ben

    <head>
    <!-- ... -->

    <style type="text/css">
    #container {
    background: url(http://www.example.com/background.jpeg) #000000 no-repeat;
    color: #ffffff;
    position: relative;
    height: <nn>px;
    width: <mm>px;
    }
    #container a {
    position: absolute;
    }
    #container a img {
    border-style: none;
    }

    #blah {
    top: <y>px;
    left: <x>px;
    }
    </style>
    </head>

    <body>
    <div id="container">
    <a id="blah" href="..."><img alt="text equivalent of image" src="..."></a>
    </div>
    </body>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The way I understand it you use 'blah'. Like:

    Code:
    ......
    #blah {
    top: 120px;
    left: 200px;
    }
    </style>
    </head>
    
    <body>
    <div id="container">
    <a id="blah" href="..."><img alt="text equivalent of image" src="..."></a>
    </div>
    the next image's anchor tag could have any id, say 'bleh'.

    Code:
    ......
    #blah {
    top: 120px;
    left: 200px;
    }
    
    #bleh {
    top: 170px;
    left: 260px;
    }
    
    </style>
    </head>
    
    <body>
    <div id="container">
    <a id="blah" href="..."><img alt="text equivalent of image" src="..."></a>
    <a id="bleh" href="..."><img alt="text equivalent of image" src="..."></a>
    </div>
    and so on.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks Mike - I'll have a look,

    Ben

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
  •