Click here to Skip to main content
15,891,621 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to center this image, it works fine on Google Chrome and Safari on the Iphone, but on Firefox and IE the image is all the way to the left.

ASP.NET
<div style="text-align: -webkit-center; removed 50%">
    <asp:Image ID="Image2"  runat="server" ImageUrl="~/NewFolder1/scottselby.jpg" />  </div> 
Posted
Comments
scott selby 24-Aug-11 23:10pm    
in the code "removed 50%" that is actually "left: 50%" something happened when i pasted it

1 solution

This is always work:

XML
<div style="width: 100%; text-align: center;">
 <asp:image id="Image2" runat="server" imageurl="~/NewFolder1/scottselby.jpg" xmlns:asp="#unknown" /> 
</div>


Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900