floating boxes over design, for ads or email opt ins? how do you do them?

Discussion in 'HTML & Website Design' started by LordXenu, Aug 2, 2008.

  1. #1
    Is there a section of code someone could show me, javascript or something i'm assuming? i don't even know what they are called to google something like this. any hints? thanks in advance...
     
    LordXenu, Aug 2, 2008 IP
  2. Joseph S

    Joseph S Well-Known Member

    Messages:
    1,373
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    155
    #2
    CSS:
    
    div.float {
      float: left;
      width: 120px;
      padding: 10px;
      }
    
    Code (markup):
    <div class="float">
      <img src="image1.gif">
    </div>
    
    Code (markup):
    PM me if you need extra help.
     
    Joseph S, Aug 2, 2008 IP
  3. Hallent

    Hallent Peon

    Messages:
    65
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    float should only align a block element next to another element. If I'm not mistaken hes referring to the boxes (block elements) that hover above other elements and to accomplish this I suggest looking into giving the element you want hover :

    position:absolute;
    now actually position the box with:
    top:0px;
    left:0px or right:0px;
    Now the sorta tricky part is locating the box center in the screen ... this is easily done with javascript (google: javascript viewport height)

    If this isnt what you were asking ignore me
     
    Hallent, Aug 2, 2008 IP
  4. LordXenu

    LordXenu Active Member

    Messages:
    313
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #4
    LordXenu, Aug 3, 2008 IP
  5. david_t

    david_t Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #5
    david_t, Aug 3, 2008 IP
  6. Hallent

    Hallent Peon

    Messages:
    65
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    aye then my suggestion is correct to move it and position it use javascript to adjust top left or right.
     
    Hallent, Aug 3, 2008 IP
  7. LordXenu

    LordXenu Active Member

    Messages:
    313
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    what would the appropriate javascript to use be?
     
    LordXenu, Aug 4, 2008 IP
  8. Hallent

    Hallent Peon

    Messages:
    65
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Im not going to write it but there are quite a few examples of moving block elements with javascript or you can look at libraries such as script.aculo.us

    I suggest a little googling, if you write something and have problems I will look over it
     
    Hallent, Aug 4, 2008 IP
  9. LordXenu

    LordXenu Active Member

    Messages:
    313
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #9
    that's all i needed, thank you, will commence googling. i didn't even know what i was supposed to be googling for...
     
    LordXenu, Aug 4, 2008 IP
  10. Hallent

    Hallent Peon

    Messages:
    65
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    One better try "javascript moving elements" Or "javascript animation"
     
    Hallent, Aug 5, 2008 IP
  11. CourageTheCowardlyDog

    CourageTheCowardlyDog Well-Known Member

    Messages:
    1,865
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    165
    #11
    You need to go to this link {This is not my site}

    http://www.dyanmicdrive.com

    Use the menu on the left hand side.

    ALL THAT YOU WANT IS IN THERE.

    Hope I was of help :cool:
     
    CourageTheCowardlyDog, Aug 5, 2008 IP