PDA

View Full Version : vertical-align:middle; works only in IE



BubikolRamios
Mar 19th, 2010, 09:37 AM
How to make this image vertical positioning cross browser (IE7 is OK)?

http://86.61.66.17/AgroZoo10/test.html

BubikolRamios
Mar 19th, 2010, 12:46 PM
Ok this is once again problem related to spaces in HTML

this shows the same in IE and FF, that is te way it should be, no gaps.


<div style ="border:1px solid black;"><img src = 'img/general/lock_edit.png' alt = '' style ="border:0 none;" /></div>


this does not show equal, and wrong in IE, ie gets gap , under image


<div style ="border:1px solid black;">
<img src = 'img/general/lock_edit.png' alt = '' style ="border:0 none;" />
</div>





adding extra &nbsp; Botth shows the same, wrong, with extra gap under image


<div style ="border:1px solid black;">
<img src = 'img/general/lock_edit.png' alt = '' style ="border:0 none;" />
&nbsp;
</div>



see example: http://86.61.66.17/AgroZoo10/test1.html



How to handle all that without squizing all into one line ?

VIPStephan
Mar 19th, 2010, 01:11 PM
Although talking about tables it's not necessarily specific to them: https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps

Excavator
Mar 19th, 2010, 05:46 PM
<div style="border: 1px solid black; font-size:0;">
<img src="img/general/lock_edit.png" alt="" style="border: 0pt none;">
</div>