...

View Full Version : IE equivalent of margin-top



iDoof
05-07-2006, 04:34 AM
I have an image that I want to nudge down like 10px. So I declared a class in the style like this:


<style type="text/css">
.pic {
margin-top:10px;
}
</style>

then attached it to the image like so:


<img src="blah.jpg" class="pic">


As usual, this works fine in Firefox, but is completely ignored in IE. I know how to code CSS for IE only but I need to know the equivalent command to "margin-top" that IE actually listens to.

any suggestions? thanks for your input guys

Arbitrator
05-07-2006, 08:27 AM
I just tested this in Internet Explorer 6 and Firefox 1.5 and the CSS margin properties are working equivalently in either browser unless the image display is set to block, in which case Internet Explorer doesn't honor margins. However, the padding property continues to work so you could use that instead to achieve approximately the same effect. Otherwise, you could also set the image display to inline or surround it with a division tag.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum