JQuery UI Dialog and gif + text display

What is the correct way to display a gif image in a dialog box with text with good formatting, etc. So far, here is my code: Copy code

var $dialog = jQuery('<div></div>').html('<p>Sending your message...</p><img src="../images/AjaxWait.gif"/>')

however, having done this, the gif will not be well aligned with the text, etc. What is the best way to format the contents of a dialog box? thanks bogumbiker

+3
source share
2 answers

You need to use the CSS that you are looking for as the final result.

Something like this I would leave my image on the left

var $dialog = jQuery('<div></div>').html('<p>Sending your message...</p><img src="../images/AjaxWait.gif" style="float: left; padding: 10px;"/>')
0
source

Place the paragraph on the left using CSS.

+1
source

Source: https://habr.com/ru/post/1737245/


All Articles