A
AAaron123
I don't expect to see an answer to this because I tried so many things and
nothing worked in FF.
But I have much time invested and would like a payoff.
The markup below is probably the simplest I've tried that works in IE8
(nothing worked in FF).
Actually, trying to get FF to center the image I tried man many things
(display, margin ...) IE8 almost always displayed correctly but FF usually
centered the image horizontally in <p> but placed it at the top of the <p>
rather in its vertical middle.
But if there is some magic out there I'd sure like to know how to center the
image using FF.
Problem:<br />
A div contains a p which contains an img<br />
The div and the p must be full width<br />
The p should be vertically centered within the div<br />
The image must be centered within the p<br />
Test in FF and IE8<br />
<div style="border: 1px solid red; padding: 0; margin: 0; height: 300px;">
<p style=" position: relative; top: 50px; background-color: pink;text-align:
center; vertical-align:middle;
margin: 0; height: 200px; line-height: 200px;">
<img style=" border: 0px;"
src="http://groups.google.se/intl/en/images/logos/groups_logo.gif"
alt='Test2' />
</p>
</div>
I'd appreciate any help at all.
nothing worked in FF.
But I have much time invested and would like a payoff.
The markup below is probably the simplest I've tried that works in IE8
(nothing worked in FF).
Actually, trying to get FF to center the image I tried man many things
(display, margin ...) IE8 almost always displayed correctly but FF usually
centered the image horizontally in <p> but placed it at the top of the <p>
rather in its vertical middle.
But if there is some magic out there I'd sure like to know how to center the
image using FF.
Problem:<br />
A div contains a p which contains an img<br />
The div and the p must be full width<br />
The p should be vertically centered within the div<br />
The image must be centered within the p<br />
Test in FF and IE8<br />
<div style="border: 1px solid red; padding: 0; margin: 0; height: 300px;">
<p style=" position: relative; top: 50px; background-color: pink;text-align:
center; vertical-align:middle;
margin: 0; height: 200px; line-height: 200px;">
<img style=" border: 0px;"
src="http://groups.google.se/intl/en/images/logos/groups_logo.gif"
alt='Test2' />
</p>
</div>
I'd appreciate any help at all.