Reputation: 2037
I have a div container which contains 6 divs. I need to layout the six divs in such a way that three of them are aligned to the left side and the rest aligned to right side. width of all divs is in percentage. The problem I am facing is when I resize the browser divs on the right side are pushed down. I'm using jquery: Here is the css of one of the divs:
$("#titleDiv").css(
{
background:"#eef0f8",width:"30%",height:"30px",float:"left",
'margin-top':"25px",'margin-left':"10px",
'padding-left':"3px",'padding-right':"2px"
});
This is the css of the container:
$("#container").css(
{
'margin-top':"5px", position:"absolute",top:"135px"
});
Upvotes: 1
Views: 223
Reputation: 2603
Add a width to the #container div to stop the inner divs from moving down.
Upvotes: 1