K
K Viltersten
I experince different behavior when i organize my div's.
My styles are as follows.
<style type="text/css">
.style1{ display: inline-table; height: 250px; width: 400px;
background-color: #ffcccc; }
.style2{ display: inline-table; height: 250px; width: 400px;
background-color: #ccccff; }
</style>
And the code is like this.
<div id="stuff">
<div class="style1" id="container1"></div>
<div class="style2" id="container2"></div>
</div>
The above example renders as supposed to. It gets me
two rectangles placed on one row. The below example
renders to one rectangle only. My guess is that the first
rectangle is behind the last one.
<div id="stuff">
<div class="style1" id="container1" />
<div class="style2" id="container2" />
</div>
Why on Earth does it happen?!
My styles are as follows.
<style type="text/css">
.style1{ display: inline-table; height: 250px; width: 400px;
background-color: #ffcccc; }
.style2{ display: inline-table; height: 250px; width: 400px;
background-color: #ccccff; }
</style>
And the code is like this.
<div id="stuff">
<div class="style1" id="container1"></div>
<div class="style2" id="container2"></div>
</div>
The above example renders as supposed to. It gets me
two rectangles placed on one row. The below example
renders to one rectangle only. My guess is that the first
rectangle is behind the last one.
<div id="stuff">
<div class="style1" id="container1" />
<div class="style2" id="container2" />
</div>
Why on Earth does it happen?!