We would like to know how to center Two Div On a Line.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.parentPanel {<!-- w w w . ja v a 2s. co m-->
background-color: #f0f0f0;
overflow: auto;
text-align: center;
}
.boxyPanel {
display: inline-block;
width: 250px;
height: 150px;
border: 1px solid blue;
}
</style>
</head>
<body>
<div class="parentPanel">
<div class="boxyPanel">The Left Div</div>
<div class="boxyPanel">The Right Div</div>
</div>
</body>
</html>
The code above is rendered as follows: