jQuery UI Dialog adding unwanted inline styles to images

Posted by oliver on Stack Overflow See other posts from Stack Overflow or by oliver
Published on 2009-12-09T15:58:22Z Indexed on 2010/03/13 15:15 UTC
Read the original article Hit count: 586

Filed under:
|
|
|

I am using JQUery UI to for the front end of a rails app I am developing. I am using jQuery dialog windows for displaying some tabbed data and inside one of these tabs I want to render some images.

The rendering of the images works fine if I view the page without Javascript, however for some reason when putting it all in a dialog window all but the last image that I render gets some inline styles from somewhere!

wihtout the dialog window:

		<img alt="Dsc_0085" class="picture" src="/system/sources/3/normal/DSC_0085.jpg?1260300748" />
		<img alt="Dsc_0006" class="picture" src="/system/sources/4/normal/DSC_0006.jpg?1260301612" />

with the dialog window:

    <img alt="Dsc_0085" class="picture" src="/system/sources/3/normal/DSC_0085.jpg?1260300748" style="height: 0px; width: 0px; border-top-width: 1px; border-bottom-width: 1px; font-size: 22px; border-left-width: 1px; border-right-width: 1px; display: inline; ">
    <img alt="Dsc_0006" class="picture" src="/system/sources/4/normal/DSC_0006.jpg?1260301612" style="display: inline; ">

I can't work out why putting the images into a dialog window is giving them inline styles with height and width of 0px, does anyone have any ideas?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui