Reputation: 73
How to place an image in table's right corner? I want set a image for an table corner. How can I do it in html or css?
Here is example of what I want to get:
Upvotes: 1
Views: 2504
Reputation: 17471
You need a wrapper for the table as @Sonasish Roy say:
HTML:
<div id="container_table">
<img src="img_right.jpg">
<table>
<!-- Here is your table content /-->
</table>
</div>
CSS:
#container_table{
position:relative;
//Set some width because table has width:100%;
width: 90%;
}
#container_table img{
position:absolute;
right:0;
top:0;
}
#container_table table{
//Here some css for your table, even you can use background-image, but you can have some problem with borders.
}
If you want to see all the above code working with an example table and image, I made this fiddle: http://jsfiddle.net/H3Vqc/5/
Upvotes: 3
Reputation: 4599
you need to wrap the table in a div, set the div in relative position and the corner details image in a absolute position.
Upvotes: 1