debbie-g85
09-23-2011, 04:01 PM
Hi I am new to CSS and I am having trouble positioning a small image to the corner of its div container.
So far the only way I have managed is to put the image in html and give its own div container and then use:
{position:relative; right:-12px; top:-30px; }
The problem with this is that its making a complete mess of everything else on the page. The rest of the page treats the image as if it were in the original position - so text is wrapping around a blank space.
Basically...
How do I change this:
http://img6.imageshack.us/img6/3936/zzzcb.png
Into this:
http://img12.imageshack.us/img12/5966/zzz2w.png
This is CSS for it so far:
.box {
background: #f4f4f4 url(./img/ticketicon.png) no-repeat right bottom;
border: 1px solid #ccc;
color: #505050;
line-height: 1.5em;
margin: 0 0 20px;
padding: 10px;
}
How would I use something like the position:relative extract above in this?
Many thanks
So far the only way I have managed is to put the image in html and give its own div container and then use:
{position:relative; right:-12px; top:-30px; }
The problem with this is that its making a complete mess of everything else on the page. The rest of the page treats the image as if it were in the original position - so text is wrapping around a blank space.
Basically...
How do I change this:
http://img6.imageshack.us/img6/3936/zzzcb.png
Into this:
http://img12.imageshack.us/img12/5966/zzz2w.png
This is CSS for it so far:
.box {
background: #f4f4f4 url(./img/ticketicon.png) no-repeat right bottom;
border: 1px solid #ccc;
color: #505050;
line-height: 1.5em;
margin: 0 0 20px;
padding: 10px;
}
How would I use something like the position:relative extract above in this?
Many thanks