Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How add div in right top position in td?

I need refact this task How to add triangle in table cell

I need not background a div.

    <td>
     <div style="position: relative;right: 0;top:0;">@Html.ImageContent("triangle_bonus.png", "")</div>
//@Html.DropDownListExtention
    </td>

enter image description here

like image 602
Mediator Avatar asked Oct 29 '25 08:10

Mediator


1 Answers

Try:

<td style="position: relative;">
<div style="position: absolute;right: 0;top:0;">@Html.ImageContent("triangle_bonus.png", "")</div>
</td>

How about changing your html to:

<td class="triangle">
<div>@Html.ImageContent("triangle_bonus.png", "")</div>
</td>

And adding this to the head of you html:

<style>
td.triangle {position:relative}
td.triangle div {position:absolute; right:0; top:0;}
</style>

Look at this for example: http://jsfiddle.net/Juvcx/

like image 153
Ryan King Avatar answered Oct 31 '25 00:10

Ryan King



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!