SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Floating button

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Floating button

    I have a button (an <img>) and i'm trying to find a way to making it floating on the page.

    For example, you know that popups that appear inside the page and floats while we scroll the page up and down, but they stay in the same place without being scrolled?

    I would like to have a picture doing that in the left and top side of my site, that img has and hyperlink.


    lets assume that the img code is this one:

    PHP Code:
    <a href="www.radio.page.pt"><img src="http://www.downloadsgospel.com.br/arquivos/radio.gif"></a

    Thanks.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi PHP_INNER,

    CSS
    Code:
    #button1 {
      position: fixed;
      left: 10px;
      top: 10px;
    }
    HTML
    HTML Code:
    <a id='button1' href="www.radio.page.pt"><img src="http://www.downloadsgospel.com.br/arquivos/radio.gif"></a>
    IE6 does not support position:fixed. There are ways to simulate it.


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
  •