ASP.NET with VB Align an image with in verry midle. so not stretched like default. RRS feed

  • Question

  • hello

    i have an imagebutton, where on i programmatically add an image like imagebutton1.imageurl="blabablal.jpg"

    but in css, i cant figure out how to center the image. so every image we put in that imagebutton will scale to the size of the button (wich is 140x100px and fill the whole innerspace within the border losing its scale like stretch does ( which i dont know how to turn off ).

    i tried background- center; <- this doesnt work for programmatically loaded images.i tries every example on every forum.

    • Moved by Carl Cai Friday, April 25, 2014 5:22 AM (from vb) asp.net forum is more dedicated for these issues
    Friday, April 25, 2014 12:03 AM