www.webdeveloper.com
Results 1 to 5 of 5

Thread: Image Always On Top Off The Html Page

  1. #1
    Join Date
    Jul 2010
    Posts
    5

    Image Always On Top Off The Html Page

    I have image that i want to be always on top right corner of my web site.
    it should be on top even if the page is resize,
    and it should be clickable.
    thanks

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    Code:
    <div style="position: absolute; z-index: 1000; top: 0; right: 0; width:##px ; height: ##px;">
    <a href="" style="display: block;">
    <img src="" style="display: block;" />
    </div>
    Place after the <body> tag, and replace the pound signs with the correct dimensions.
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

  3. #3
    Join Date
    Jul 2010
    Posts
    5
    thanks -it works when i resize the page, but not when you scroll.

  4. #4
    Join Date
    Aug 2007
    Posts
    3,767
    position:fixed;
    Quirksmode shows it not to work in IE 5/6, with a bug in IE 7 and Safari 3/4. If that's alright, then it's the solution.
    Great wit and madness are near allied, and fine a line their bounds divide.

  5. #5
    Join Date
    Jul 2010
    Posts
    5
    i dont know - i cant see it work in any browser(ie7, ie8, ff, chrom).
    this is my code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>
    <body>
    <div id="htmlBody">
    </div>
    <div id="topRightPict" style="position: absolute; z-index: 1000; top: 0; right: 0;
    width: 122px; height: 99px;">
    <a href="http://www.google.com" style="display: block;">
    <img src="http://trading-breakingnews.com/en-US/live_chat_support_EN.png" border="0"
    alt="Live Chat" style="display: block;" /></a>
    </div>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles