Sent by S.D.Price on 6 May 2003 16:04
Thanks Geoff that solution works great - a lot less code too!
Steven
-----Original Message-----
From: Geoff Sheridan [EMAIL-REMOVED]]
Sent: 06 May 2003 16:15
To: S.D.Price; [EMAIL-REMOVED]
Subject: Re: [css-d] Center Aligning Floats in Mozilla and Opera
>Can anyone see what I am doing wrong?
You have too many display:block s going on.
text-align:center SHOULD only work on inline elements. (works on
block elements by mistake in IE)
It should be applied to the enclosing block element and is inherited. You
also need to declare a width for anything you float.
This is ALL you need to get the effect you're after for the icon div
and its content:
div#icon{float:right; width:75px; text-align:center;}
div#icon img {border:0;}
<div id="icon">
<a href="#"><img src="icon.gif" alt="" /><br />
Link Caption
</a>
</div>
also your padding and margin could be
padding:0;
margin:0;
and height:auto can be omitted since it is implied.
HTH
Geoff
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/