I need two divs to look a bit like this:

    |               |
 ---|    DIV I      |------------------------
|   |_______________|                       |
|             DIV II                        |

This is an easy task if I know the absolute position, but my divs can be dragged with JQuery .draggable(), so the position is unknown.

How can I accomplish this task?

share|improve this question

Which div (or divs) can be dragged, and along what axes? – Bobby Jack Mar 16 at 0:09
feedback

2 Answers

up vote 0 down vote accepted

If you position div I relatively within div II, you can draw it "outside" div II by using negative margin. For example:

.divi {
    width: 200px;
    height: 70px;
    margin-top: -40px;
    margin-left: 30px;
}

If, however, divi can be dragged also, then you may have a bit of troubles making this work with pure css.

share|improve this answer
feedback

If you need your logo to be above the content div, but both divs can be moved at any time, or one of them, have you tried using the logo divs z-index as something really high like z-index:9999; to make sure it always displays above the content div (this is if i'm understanding the question correctly of course).

share|improve this answer
feedback

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.