I am trying to get the actionlink to align right for this code.
<div style="height: 40px; background-image: url('/Images/page-title-bg.gif'); background-repeat: repeat-x; background-color: #EBEBEB; border: 1px solid Silver; border-top: 1px solid #f9f9f9; padding-left: 10px; box-shadow:0px 0px 2px 2px rgba(0,0,0,.1);">
<h1 style="border: none; line-height: 40px; text-shadow: 1px 1px 1px #fff;">
Edit Publication @Html.ActionLink("Back to List", "Approve", null, new { style="text-align:right; font-size:12px;" })
</h1>
</div>
For some reason the text-align:right style is not working. I basically want the title on the left and the actionlink on the far right of the div.
This is the problem section
Edit Publication @Html.ActionLink("Back to List", "Approve", null, new { style="text-align:right; font-size:12px;" })
This is the html that is generated as per request
<div style="height: 40px; background-image: url('/Images/page-title-bg.gif'); background-repeat: repeat-x; background-color: #EBEBEB; border: 1px solid Silver; border-top: 1px solid #f9f9f9; padding-left: 10px; box-shadow:0px 0px 2px 2px rgba(0,0,0,.1);">
<h1 style="border: none; line-height: 40px; text-shadow: 1px 1px 1px #fff;">
Edit Publication <a href="/EPub/Approve" style="text-align:right; font-size:12px;">Back to List</a>
</h1>
</div>
Off the top of my head…
… as quick guess. the overflow on the h1 should act as a clear for the 2 floats contained within.