Whing Dela Cruz
asked on
Div alignment
Hi experts, I wish to align two div in one line. I have here 3 div one is the mother and the other two are the children. My codes below didn't work. I need to align the two child-div in one line. Any help please!
<!DOCTYPE html>
<html>
<head>
<title>Text2Go</title>
<link rel="stylesheet" href="iStyle.css"/>
</head>
<meta charset="utf-8" />
<body>
<div class="stay">
<div id="my7" class="stay-son1">
<p>Part1</p>
</div>
<!--2nd-->
<div id="my8" class="stay-son2">
<p>Part2</p>
</div>
</div>
</body>
<script>
$('#body').css('min-height', screen.height);
</script>
</html>
#body {
height: 100%;
width: 100%;
}
div.stay
{
line-height:35px;
height:100%;
width:100%;
float:center;
font-size: 100%;
background-color:#33FF66;
margin: 0px 0px 0px 0px;
border: 1px solid #73AD21;
}
div.stay-son1
{
line-height:35px;
height:100%;
width:50%;
float:center;
font-size: 100%;
background-color:greenyellow;
margin: 0% 0% 0% 0%;
border: 1px solid #73AD21;
}
div.stay-son2
{
line-height:35px;
height:100%;
width:50%;
float:center;
font-size: 100%;
background-color:grey;
margin: 0% 0% 0% 0%;
border: 1px solid #73AD21;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Both are changed to
width:49%;
float:left;
Open in new window