I have 13 div elements and need it to look like this:
I am restricted from using a table, even though this looks like a job for a table (long story, job requirements, just take it as it is)
I can not add or remove any html elements -- the only modifications that I can make to the elements adding attribute tags such as class name.
Here is what I have so far (sorry for any formatting errors)
<html>
<head>
<style type="text/css">
html, body {
height: 100%;
width: 100%;
margin: 0px;
text-align:center;
vertical-align:middle;
}
body div {
background-color: gray;
height: 24%;
width: 24%;
display: inline-block;
text-align: center;
vertical-align: middle;
margin: 1px;
}
body div:first-child + div + div + div + div + div {
background-color: gray;
height: 48%;
width: 48%;
display: inline-block;
text-align: center;
vertical-align: middle;
margin: 1px;
}
</style>
</head>
<body>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
<div>13</div>
</body>
</html>