954,164 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

image placement

so im really getting into the ajax crowd, though i dont strictly use ajax (no xml) i like the functionality of calling server side scripts for dynamic php functions...

anyway i have a few images in this form ive made that i would like to be placed correctly

let me explain....

I have a form input..

then i have a div:

the ajax function calls the variables in the onkeyup section and based on the result displays an image.

so the problem is the image is not displaying in the right size OR the right place in the div... if i use valign='bottom' it doesnt change, which is the problem, instead of aligning with the bottom of the table cell it stays above, and makes the table all messed up, and messes with my layout...

the code for the images is:

<img src='../images/loading.gif' align='center' valign='bottom' width='16' height='16' />


so im wondering if anyone can even understand my problem, let alone help me...

thank you...
~Ryan

Merlin33069
Junior Poster
126 posts since May 2008
Reputation Points: 10
Solved Threads: 5
 

Try this first on the image that corresponds to your ajax call:

<img src='../images/loading.gif' style="display : block; width : auto; height : auto; margin : 0 auto;" />
essential
Posting Shark
974 posts since Aug 2008
Reputation Points: 114
Solved Threads: 138
 

that didnt change the placement

so i showed the borders of the table and its actually making the talbe bigger and putting space below the image that shouldnt be there, so it might be adding a break below the image, but whatever its doing it does it even if i dont use the ajax (place image directly in html)

Merlin33069
Junior Poster
126 posts since May 2008
Reputation Points: 10
Solved Threads: 5
 

actually, i got it, the problem was that the entire code looked like this:

<table cellpadding='0' cellspacing='0' border='1'><tr><td>#2:&nbsp;<td><input type='text' value='0' maxlength='7' size='7' name='required_item_entry_2' id='rie2' onkeyup='checker("rie2", "rie2-1", "world", "items", "entry", "exists", "0")'>&nbsp;<td cellpadding="0" cellspacing="0"><div id='rie2-1'></div>&nbsp;<td><input type='text' value='0' maxlength='7' size='7' name='required_item_amount_2'></td></tr></table>


that was ONE line of the form

it goes like:

name - input - image - input

its all in a table and the problem was this:

<td cellpadding="0" cellspacing="0"><div id='rie2-1'></div>&nbsp;<td>


the non breaking space in the code is not in the div tag, so its still in the code after the image is inserted..... lol

Merlin33069
Junior Poster
126 posts since May 2008
Reputation Points: 10
Solved Threads: 5
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You