PDA

View Full Version : img padding in IE and Firefox


pjutter
01-18-2007, 08:40 PM
Hi, I'm using image padding but can only get it to work in Firefox. Here's a simple statement that I'd like to use:

<img src="photos/mypicture.jpg" width="80" height="115" align="left" style="padding-left: 0pt; padding-top: 1pt; padding-bottom: 1pt; padding-right: 4pt">

The padding in that statement only works in Firefox. Any idea how I can write it to work in IE also? I tried it with a div tag but had no results either. I'd eventually write it onto a stylesheet if I could ever get it to work.

Thanks for your help.

Phyllis

haveacigar
01-18-2007, 08:50 PM
Hi, I'm using image padding but can only get it to work in Firefox. Here's a simple statement that I'd like to use:

<img src="photos/mypicture.jpg" width="80" height="115" align="left" style="padding-left: 0pt; padding-top: 1pt; padding-bottom: 1pt; padding-right: 4pt">

The padding in that statement only works in Firefox. Any idea how I can write it to work in IE also? I tried it with a div tag but had no results either. I'd eventually write it onto a stylesheet if I could ever get it to work.

Thanks for your help.

Phyllis

Try this


<div style="width:inherit; height:inherit; float:left; padding:1pt 4pt 1pt 0;">
<img src="photos/mypicture.jpg" />
</div>

pjutter
01-18-2007, 09:06 PM
Thank you!!!!! That works great! Now I'll go update my pages. :-)

Phyllis

pjutter
01-18-2007, 09:07 PM
Hey, what does the inherit bit mean on the width and height? Should I not input those? (Always trying to speed up the display.)

haveacigar
01-18-2007, 09:51 PM
Hey, what does the inherit bit mean on the width and height? Should I not input those? (Always trying to speed up the display.)

It just means it will fill out the div with the attributes it is given, so it adapts to the information it is given... if you see what i mean