PHP Generated Inputs and Standard DOM Inputs display differently
As you can see the following produces the exact same configur开发者_如何学JAVAation of Select:Text:Image. However whatever the HELL I do I cannot get them to display the same without different CSS which I do not want to do. I have used CSS resets, Identical CSS, removed attributes etc. Any idea what is making them act so stupidly? It is really starting to p*ss me off.
PHP Generated inputs:
while ( $result = mysql_fetch_array($query) ){
echo '<div id="'.$result['id'].'"';
echo '<select class="select"></select>';
echo '<input type="text" value="'.$result['item'].'" /><input type="text" value="'.$result['price_q'].'" /><input type="text" value="'.$result['price_p'].'" />';
echo '<img src="images/edit.png" class="edit" />';
echo '<img src="images/delete.png" class="delete" />';
echo '</div>';
}
DOM Inputs:
<form method="post" action="" name="insert_db" id="insert_db">
<select name="category" id="catselect" class="select"></select>
<input type="text" id="item" />
<input type="text" id="price_q" />
<input type="text" id="price_p" />
<input type="hidden" id="category" />
<input type="hidden" id="sub_category" />
<img src="images/accept.png" /><img src="images/accept.png" />
</form>
Regards, Phil.]
I should clarify the PHP generated inputs seem to have negative margins by default.
Depending on the encoding and the text editor used in saving file, it is possible that the php rendered version is not generating any white-space while the straight HTML version is generating white-space via line-breaks and tabs. What happens when you remove all white-space from the straight html version? Also, do you have a link to post your test for us?
精彩评论