1

I dont know how to phrase this question correctly, I would like to create something like the logo on the upper right corner of this website: http://www.afterthecircle.com/

When the user scrolls down, the logo moves with the scrolling movement and always stays visible to the user.

Any suggestions?

Dominic L.
  • 65
  • 1
  • 5

3 Answers3

3

Use position: fixed along with top or bottom and left or right:

.logo {
    position: fixed;
    bottom: 1em;
    right: 1em;
}
Fenton
  • 241,084
  • 71
  • 387
  • 401
3

As brbcoding said, you are looking for the CSS property position with the value fixed. With the properties top, bottom, left, and right, you can then position the element. An example:

CSS

.fixedElement {
    position: fixed;
    top: 100px;
    left: 100px;
}

HTML

<div class=fixedElement>Hey!</div>
Aart Stuurman
  • 3,188
  • 4
  • 26
  • 44
2

Fixed positioning will allow you to scroll and keep an item in it's original position.

#fixed-thing {
    position: fixed;
    top: 0;
    right: 0;
}

DEMO

brbcoding
  • 13,378
  • 2
  • 37
  • 51