I am trying to create a project collaboration to to list. hen I click on the "Assign Task" button a flyout div should contain a datepicker and a drop down of who the task should be assigned to. But for now I just put some lorem impsum text.
The problem that I am running into is when the flyout div is shown all the li elements get pushed down
I tried setting the flyout to absolute but it goes all the way to the top of the page. I tried setting the ul to absolute but it all gets collapsed in one line
Does any one have any ideas they can offer that will let me toggle the assign_task div and not push down the ul element?
Below is a link to my jsfiddle . Any help would be really appreciated.
https://jsfiddle.net/eldan88/qvrs8osm/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="../assets/js/jquery.js"></script>
<style>
body{
margin-top : 300px
}
.assign_task,.datepicker{
display: inline-block;
width: 212px;
position: relative;
z-index: 10;
background-color: white;
}
.assign_task{
top :220px
}
</style>
</head>
<body>
<ul>
<li>Finish Wireframe Design <button>Assign Task</button>
<div class="assign_task">
<div class="datepicker"> Due Date and user task assignment goes here
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem eligendi eos fuga in ipsum libero sit totam veritatis? Ab adipisci architecto debitis doloremque fuga id molestiae provident saepe unde vel.lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores commodi cumque et libero nostrum porro, quae sunt! Aspernatur deleniti fugit, magni
</div>
</div>
</li>
</ul>
<ul>
<li>Make sure that the contact page, and the landing page gets revised tomorrow <button>Assign Task</button>
<div class="assign_task">
<span class="datepicker"> Due Date and user task assignment goes here</span>
</div>
</li>
</ul>
<script>
$(".assign_task").hide();
$("button").click(function () {
var task_assignment_div = $(this).next();
task_assignment_div.toggle();
});
</script>
</body>
</html>