Image in top left hand corner, without disrupting layout?

Discussion in 'JavaScript' started by Flybylogo, Dec 20, 2009.

  1. #1
    How do I make an image be in the top left hand corner but so that it is over my layout instead of part of it. When you scroll down I need it to be as if it is part of the layout ( so that when you scroll down it does not stay there, when everything else has moved)

    Thanks for the help!
     
    Flybylogo, Dec 20, 2009 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    I think this will help you

    
    <style>
    #left_top_div{
       position: fixed;
       top: 0px;
       left: 0px;
       z-index: 100;
    }
    </style>
    
    <div id="left_top_div">Your text!!!</div>
    
    Code (markup):
     
    s_ruben, Dec 20, 2009 IP
  3. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #3
    dimitar christoff, Dec 21, 2009 IP
  4. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #4
    For ie6 there is method "expression"!!!
     
    s_ruben, Dec 21, 2009 IP
  5. Flybylogo

    Flybylogo Peon

    Messages:
    355
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    got it: style="position: absolute; left: 0px; top: 0px;"
     
    Flybylogo, Dec 21, 2009 IP
  6. Flybylogo

    Flybylogo Peon

    Messages:
    355
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    IE 6 is terrible they should make it unusable.
     
    Flybylogo, Dec 21, 2009 IP
  7. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #7
    they* did :D what do you expect from a browser that's 9 years old now...


    --------
    * - "they" being microsoft
     
    dimitar christoff, Dec 21, 2009 IP
  8. Rashtra

    Rashtra Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I think this code is beneficial

    Same suggestion is given by ruben

    <style>
    #left_top_div{
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 100;
    }
    </style>

    <div id="left_top_div">Your text!!!</div>

    baagdi.com
     
    Rashtra, Jul 12, 2010 IP