Reputation: 5831
My html code looks like this:
A wrapper div (percent width, floated left) containing:
The problem: I want to keep the coding order like above, but for user experience I want to inverse the divs order using CSS to get something like this:
Note: the wrapper div is 20%, floated left, followed by 4 other similar divs on that page.
Ty!
This is the fiddle link:
http://jsfiddle.net/sexywebteacher/4sbQf/
Upvotes: 5
Views: 14862
Reputation: 5592
HTML
<div id="wrapper">
<div id="txt">
</div>
<div id="img">
</div>
</div>
CSS
div#wrapper
{
height:100px;
width:60px;
border:1px solid black;
position:relative;
}
div#txt, div#img
{
position:absolute;
margin: 5px;
width:50px;
}
div#img
{
top:0px;
height: 60px;
border:1px solid red;
}
div#txt
{
bottom:0px;
height:20px;
border:1px solid green;
}
Upvotes: 4