Nov292007Absolute/Relative Positioning Demystified
Are you confused about how absolute and relative positioning work in CSS? If so, I’ve written a short article and tutorial for CreativePro.com, which explains what the two positioning methods are, and how to use them together to create some interesting web design effects:
You can check it out at http://www.creativepro.com/story/howto/26137.html
8 Responses to “Absolute/Relative Positioning Demystified”
Dave McFarland December 11th, 2007 at 9:13 am
Jez,
You’re welcome!!! That’s the kind of enthusiasm I like to hear (or is that read?)
Have fun.
Aghper Jan December 17th, 2007 at 6:27 am
I would like to thank you Dave for your books Missing CSS/Dreamwever CS3.I have never seen someone written the way you write.very clear to the point,you explain every step without assuming that we should know what padding is,…you still take the time to give brief explanation (memory refreshing to us
whenever possible.I will buy all the books that you publish.thank you Dave again keep up the good work.
Dave McFarland December 17th, 2007 at 8:00 am
Aghper,
Thanks for the compliments! I’m very glad you enjoy my books.
Aghper Jan December 17th, 2007 at 6:45 pm
Hi Dave,
If I would like to ask your expertise about learning PHP(which book,…) or any other programing language matters,where that will be?do you have any site where we can contact you?thanks in advance.
Dave McFarland December 19th, 2007 at 10:43 am
Aghper,
There are a lot of good PHP books out there. For just getting started, I’d recommend “Build Your Own Database Driven Website Using PHP & MySQL” from SitePoint. You can find out more about it at: http://www.sitepoint.com/books/phpmysql1/.
Michael July 10th, 2008 at 11:48 pm
Thanks for you help on this subject.
I have a question regarding your blogdate tutorial at http://www.creativepro.com/story/howto/26137.html
.post{
postition: relative;
}
It would appear that the above would do nothing so I must have missed something.
Mike
Dave McFarland July 11th, 2008 at 11:14 am
@Michael
The .post style is applied to the paragraph that contains the date. By setting its position to relative you can position stuff INSIDE that paragraph relative to it. In other words, an absolute position applied to the date (which is a tag with the class date) is positioned in relationship to the TOP, LEFT, RIGHT or BOTTOM of the paragraph, NOT of the browser window.


Jez Lerman December 11th, 2007 at 9:11 am
I cannot thank you enough for this oh so wonderfully useful article!
Within minutes of reading it I was able to make layers snap into the exact position I had intended on the canvas.
Thank You, Kind Sir, Thank You! I now feel so much more comfortable with CSS. [jumps up and down with high excitement]YES!!! I can now position elements at will and at my wanton pleasure [fist cuffs the air].
Can you hear me smiling?
Cheers. Can’t wait to read more of your articles.
Happy Xmas, Sir. Brilliant stuff.
:-)