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

You may have noticed that some websites have a feedback feature created using http://uservoice.com . It displays an icon to the left or right of the screen.

But how is this icon positioned? It seems that its position depends on the height of the browser ....

Can you help me how to create some kind of icon, for example, with the ability to redirect me to another URL?

tnx on adv!

+3
source share
2 answers

It uses position: fixedin the tag a. It uses top: 45%to make it "move" with the height of the window.

+4

css JS !

JTricks!

JTricks, , (fixedmenu )

! =)

( )

+1

Source: https://habr.com/ru/post/1756261/


All Articles