Positioning buttons with respect to each other...

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
K-Z
Forum Commoner
Posts: 29
Joined: Mon Jul 05, 2010 9:03 am

Positioning buttons with respect to each other...

Post 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?? :?:
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

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

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply