Positioning Boxes

liunx

Guest
Hi ;)

In reference to positioning boxes etc I understand the meanings of Float and Absolute positioning --- but i cannot find out what relative positioning means -- :confused:

Can you help please --- :)Here's the top item returned from Googling css relative position.

<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/visuren.html#positioning-schemeHi">http://www.w3.org/TR/REC-CSS2/visuren.h ... g-schemeHi</a><!-- m --> -
I'd recommend getting to know 'relative' because
it's a much more flexible way to tweak your layout
than absolutes are. [Humble Opinion]

Let's say you've got a paragraph that's floated left,
and an image that also is floated left to bump up next
to it, and a clear:none; element below them. The image
is a .gif and you want to tweak where it sits to emphasize
something or other...

You could either increase or decrease its padding/margins
to move it a bit, &/or use relative positioning. After
position:relative; you'll then do a top: right: bottom:
&/or left: the length or percentage you enter will
offset the image from that side.

So, let's say you want it to be towards the top of the
page, you'd use top:-5%; and if it needs to go down,
then top:5%;. This takes the element and moves it from
its original position. In contrast:
An absolute takes it out of its regular positioning
altogether and the top: left: , etc. refer to where it
will go in comparison to the browser window.

Hope that helps,
ElHi LJK/

Thanks very much --mate,that gives me a far better insight into the relative positioning,i appreciate the time you took in helping me :)

It is more difficult to explain than absolute and float -- a tricky one.

Thank you very much :cool:

Thanks Ray

For your google link :)

Have a nice day to you both
 
Back
Top