Page 1 of 1

Positioning buttons with respect to each other...

Posted: Mon Sep 27, 2010 9:36 am
by K-Z
Hi... can anyone please tell me how to position a button in html with respect to another button??

I know relative positioning of buttons but it positions a button with respect to its original/default position.

I want to position a button with respect to its previous button....Is there a way to do that?? :?:

Re: Positioning buttons with respect to each other...

Posted: Mon Sep 27, 2010 10:08 am
by pickle
Not really. The DOM is arranged like a tree, and positioning is based on, like you said, original position and the position of a node's parent - not it's siblings. If you've got 2 buttons beside each other and you want the second to be, say, 20 pixels left of the first, set the "margin-left" property.

Also, this is client-side, not PHP code, so I'll move the topic.