开发者

How to fix position an element but keep the height relative to browser window?

You probably noticed that some web sites have a feedback feature created 开发者_运维技巧with http://uservoice.com. It display's a badge on left or right of your screen.

But, how is that badge positioned? It looks like its position depends on the height of the browser....

Can you help me with how to create some sort of badge like this, with functionality to redirect me to the some other url?

tnx in adv!


It uses position: fixed on the a tag. It is using a top: 45% to get it to "move" with the window height.


Heres a cool example of css and JS for floating a link or menu!

JTricks Example!

Heres another example from JTricks thats more like what your looking for (fixedmenu not floating)

Another example!! =)

(shows legacy browser compatibility)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜