abed akhi

abed akhi

  • NA
  • 57
  • 29.3k

center an image inside a repeater

Oct 15 2012 5:14 AM
Hi,

I have the below code:
<ul id="slide" style=" width:340px; height:480px; margin-left:2em; background-image: url('Images/boxframe.jpg'); vertical-align:middle;" >
<asp:Repeater runat="server" ID="repeater1">
<ItemTemplate>
<asp:Image ID="Image" runat="server" ImageUrl='<%# Container.DataItem %>' />
</ItemTemplate>
</asp:Repeater>
</ul>

and I need to place the image at the center of the ul as the ul is a boxframe so a frame and I need to place the image at the center of that frame I used:
<center><asp:Image..></center>
and <asp:Image style="margin:0px auto; display:block"...>
but that did not work what should I do?

Answers (5)