views:

117

answers:

2

I have a layout with a variable-length menu on the left, and variable-length content on the right. In between the menu and content is a divider implemented using a repeating background image, which is part of the content div. This means that as the content expands or contracts, so does the divider.

If the height of the content is less than the height of the menu, the divider is still the height of the content, when what I really want is the divider to be the height of the menu in this case. Is there any way to implement this in CSS?

+1  A: 

Have the dividers background image in the content are and the menu and have the content area overlap the menu the width of the divider using negative margins or something similar.

Thomas J Bradley
This is very similar to the solution I thought of right after I posted the question :) Thanks.
Skilldrick
+1  A: 

An alternative would be to use the background image on a wrapper div and use background-position to place it between the menu and content divs.

Andrew Mason