I have the following code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<style type="text/css">
body, html{
height: 100%;
}
#outer {
width: 90%;
height: 90%;
margin: 5% 5% 5% 5%;
background-color: #333;
}
#left-content {
height: 100%;
width: 50%;
}
#right-content {
height: 100%;
width: 50%;
}
</style>
<div id="outer" style="display: block">
<div id="left-content" style="display: block; background-color: red;">xx</div>
<div id="right-content" style="display: block; background-color: yellow;">xx</div>
</div>
</body>
</html>
The outer DIV has a margin around it and inside that are two DIVs. I wanted to the two DIVs to be side by side but it seems that one is below the other.
How can I make them be side by side?
Another related question. For something like this would it be better to use display: table and then table-cell ?