Question

Discussion in 'HTML & Website Design' started by Gamerz7, Jul 24, 2008.

  1. #1
    Hello, I was wondering if someone could help me with figuring out how to add a "floating" image, if that's what it's even called :p

    An example of what I want can be found on www.namecheap.com

    You will notice how on the top right corner, they have there different offers displaying.

    I would like to add something like that to my site, but not sure of what kind of html, javascript, or even php to use.

    Also, it doesn't have to rotate like theirs does, it can just be static.

    Hope someone can help me on this!

    Thanks.
     
    Gamerz7, Jul 24, 2008 IP
  2. lunabee

    lunabee Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It uses javascript to do that. You can find a generator for a similar concept at quickribbon.com.
     
    lunabee, Jul 24, 2008 IP
  3. Gamerz7

    Gamerz7 Well-Known Member

    Messages:
    407
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Thanks :D

    I also looked at the script it uses, now I know how to do one.
     
    Gamerz7, Jul 24, 2008 IP
  4. Cri2T

    Cri2T Peon

    Messages:
    104
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It uses Javascript to rotate the images, however the displaying of the image will always be done with HTML/CSS

    Here's a code that should work for you:

    
    <div id="cornerad"><a href="link"><img src="adimage" alt="adDescription" /></a></div>
    
    and use this CSS:
    
    #cornerad{
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    }
    
    #cornerad a, #cornerad img{ border: 0; }
    
    Code (markup):
    The latter is to make sure that the browser doesn't draw a default link border around the image.

    If this doesn't work, let me know as I didn't test it, and it's been a long time since I've made a corner ad like that. ;)
     
    Cri2T, Jul 24, 2008 IP