user1021182
user1021182

Reputation: 151

Position a <div> over another <div>

This is my code:

<asp:Repeater ID="DataViewer" runat="server">
<ItemTemplate>

<div style='border: 0px; width:600px;overflow-x: auto; overflow-y: hidden;'>
    <div style='float:left;'><%# Eval("DriverId") %>&nbsp;&nbsp;&nbsp;&nbsp;</div>
    <div style='border: 3px solid black; float:left; height: 50px;'>
        <div style='border: 0px; float:left; height: 50px; width:<%# Eval("OrderCount") %>cm;'><%# Eval("OrderCount") %></div>
        <div style='position:relative; border: 0px; float:right; height: 50px; width:<%# Eval("OrderCountWhereNameIsNotNull") %>cm; background-color: red;'><%# Eval("OrderCountWhereNameIsNotNull") %></div>
    </div>
</div>
<BR/>

</ItemTemplate>

instead of placing the divs one besdies another, i need to put them on over another: image attached enter image description here

Upvotes: 0

Views: 817

Answers (1)

David Hor&#225;k
David Hor&#225;k

Reputation: 5565

Here is preview

<div style='border: 0px; width:600px;overflow-x: auto; overflow-y: hidden;'>
    <div style='float:left;'>&nbsp;&nbsp;&nbsp;&nbsp;</div>
    <div style='border: 3px solid black; float:left; height: 50px;'>
        <div style='border: 0px; float:left; height: 50px; width:150px'>
            <div style='float: right; border: 0px; height: 50px; width: 50px; background-color: red;'></div>
        </div>
    </div>
</div>

Upvotes: 1

Related Questions