user1505713
user1505713

Reputation: 607

CSS: preserving box positions on resize?

Before resize

After resize

Box 1 contains an image and centered text below it. Box 2 is a set of paragraphs enclosed in a DIV. What rules would I use to make sure that box 2 stays by box 1 whenever the browser window is resized, while making sure the offset W does not change? Thanks!

Upvotes: 0

Views: 32

Answers (1)

user3141031
user3141031

Reputation:

You can set margin-top on the right content div (specified absolutely or by a percentage) and that will ensure that div is always w distance away.

Here's an example: http://jsfiddle.net/JJyat/

Upvotes: 2

Related Questions