/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@KDLAJul 15.2010 — <i>
</i>&lt;div style="position: absolute; z-index: 1000; top: 0; right: 0; width:##px ; height: ##px;"&gt;
&lt;a href="" style="display: block;"&gt;
&lt;img src="" style="display: block;" /&gt;
&lt;/div&gt;

Place after the <body> tag, and replace the pound signs with the correct dimensions.
Copy linkTweet thisAlerts:
@carmeladiauthorJul 19.2010 — thanks -it works when i resize the page, but not when you scroll.
Copy linkTweet thisAlerts:
@Declan1991Jul 19.2010 — [url=http://www.quirksmode.org/css/contents.html]position:fixed;[/url]

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.
Copy linkTweet thisAlerts:
@carmeladiauthorJul 20.2010 — 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>
×

Success!

Help @carmeladi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...