As images say more than 1000 words, here’s my problem (note: I can’t post images because I don’t have enough SO reputation, so I’ll post a link):
http://s7.directupload.net/images/120604/skhgwuqb.png
Here’s the use case:
The black, surrounding div is a page preview. The blue divs inside the black div are sections of this page. The blue divs outside are “edit” buttons. They should have the same vertical position as their correspondants.
because the black div and it’s contents are a page preview, I cannot move the edit buttons inside the div (without altering the page template to have “edit” buttons, which of course is bad by design).
How can I align them? If Javascript is necessary to achieve this, it will be okay, although I strongly favor a CSS solution.
I am not aware of a CSS-only way to achieve what you want if you can’t touch anything in the surrounding div. Here’s a jQuery solution:
http://jsfiddle.net/BuS2p/