...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Position Page Elements Accurately

Computing : Web Sites

The easiest way to position elements accurately on a page - and the only way to do it with pixel precision - is through the use of stylesheets.

There are two ways of positioning elements with stylesheets - one is using relative positioning and the other with absolute.

The difference is that positioning relatively keeps the element in the document flow, whilst absolute positioning takes it outside of the document flow.

Relative elements are positioned relative to the page, therefore, hence the name and difference between the names.

Note that an element nested in an element already positioned relatively or absolutely will be positioned relative to that element.

It takes time, practice and experiment to work out which is best for each occasion, and getting used to positioning your elements on the page.


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Position Page Elements Accurately

  Receive Our Newsletter




Questions about CSS:

Ask question

More Articles:
How to share video online
How to encourage other sites to link to you
Sell re-sale rights and make more money from your ebook