I have a table and within the td I have an a tag with class='day'. I want the class='day' to be at the top right of the td. I thought this should be as simple as setting the following css:
td { position: relative;}
.day{ position: absolute; top: 0; right: 0; }
That’s not working right. I have the full code here: http://jsfiddle.net/Mftp7/
Not come up against this before, but it looks like a quirk of
tdelements beingdisplay:table-cellby default, which don’t seem to listen properly to relative positioning.As a workaround, you could wrap the contents of your
tdinside adivand make thedivrelative instead. Then you’ll get the desired behaviour.