PDA

View Full Version : Static Image Link



ches
01-30-2007, 10:36 AM
Does anyone know how i can place a static(or floating) image with a link that touches the top right corner(or any of the other corners) of the page.

BLiZZaRD
01-30-2007, 02:05 PM
Your best bet is to use CSS to position it.

Here are a few links with that information:

w3schools (http://www.w3schools.com/css/css_positioning.asp)

BarelyFitz (http://www.barelyfitz.com/screencast/html-training/css/positioning/)

DevX (http://www.devx.com/projectcool/Article/19918)

Just remember that positioning is done based on the containing element. So if you have a few divs or tables and your image is inside those the border attributes will be from those walls not the browser itself.

mburt
01-30-2007, 02:08 PM
Yes, make sure it's not nested in any elements.

BLiZZaRD
01-30-2007, 02:29 PM
Nested. That's the word I was looking for :D Meh.

Twey
01-30-2007, 02:50 PM
The simplest way is to set:
position: fixed;
top: 0;
right: 0;Unfortunately, everyone's favourite browser (IE<7) doesn't support position: fixed;. The common workaround is to use a huge 100&#37;x100% <div> with scrollbars and put all one's content inside it, then put the offending image outside.

mburt
01-30-2007, 03:24 PM
everyone's favourite browser (IE<7)
Yes, it is a tragedy :p
After switching to anything but IE, you'll never go back.

BLiZZaRD
01-30-2007, 04:21 PM
After switching to anything but IE, you'll never go back.

You noticed that too? :p

ches
01-31-2007, 12:02 PM
Yeh
I want something like the "too cool for IE" thing.
I would have used that, but the main problem (as the name itself suggests), it doesnt work for IE (<IE7)

Twey
01-31-2007, 03:36 PM
The common workaround is to use a huge 100&#37;x100% <div> with scrollbars and put all one's content inside it, then put the offending image outside.This tends to produce the same effect.