Saturday, August 2, 2014

CSS: How to make a DIV element float on a page

This post is nothing special. It's just basic CSS. Just a note for myself. If it helps you, then great!

You can make a block element like a DIV stay at a fixed position of the screen while the page scrolls making it look like the DIV is floating.

This is pretty simple. Just apply the following CSS properties below to the element.

position: fixed;
top: 100px;
right: 5px;


No comments:

Post a Comment