I am aware that you can center a block item by setting the left and right margin to auto
.
However, is it possible to align it to the right edge? And how would this be done?
Edit: without using float: right
(because it doesn't seem to work, at least not with <ul>
's)
Edit again: Here is a snippet of the code:
<td style='vertical-align: top; text-align: center;'>
<b>Choices:</b><br><br>
<ul id='orderchoices' style='margin-left: auto; margin-right: auto;'>
...
</ul>
</td>
Here is the style for #orderchoices
#orderchoices li {
border: 1px solid #666;
background: #333 url(images/dark_gloss.png) repeat-x;
color: #eee;
margin: 3px;
padding: 5px;
cursor: pointer;
width: 160px;
font-style: italic;
}
I want the ul
right-aligned in the td