|
Posted by VUNETdotUS on 11/09/07 17:11
On Nov 9, 11:47 am, Els <els.aNOS...@tiscali.nl> wrote:
> VUNETdotUS wrote:
> > Can anyone explain what IE 5 fudge from CSS below is? Why width? What
> > about height?
>
> sure :-)
>
>
>
> > #right {
> > position: absolute;
> > top: 0px;
> > right: 0px; /* Opera5.02 will show a space at right swhen there is no
> > scroll bar */
> > margin: 20px;
> > padding: 10px;
> > border: 5px solid #ccc;
> > background: #666;
> > width: 150px; /* ie5win fudge begins */
> > voice-family: "\"}\"";
> > voice-family:inherit;
> > width: 120px;
> > }
> > html>body #right {
> > width: 120px; /* ie5win fudge ends */
> > }
>
> IE5 uses a different box model than current browsers in standards
> mode: where up-to-date browsers will calculate the border and padding
> to be added to the width of an element, IE5 takes them off.
> So, for IE7/Firefox, the padding of 10px left and right, plus the
> borders of 5px each, will total 30px to be added to the 'usable' width
> of the element (120px), and display it as a total of 150px wide.
> IE5, needs to see width:150px, and it will then take the padding and
> border width off, and also leave 120px for the content.
>
> The fudge is where IE5 can't read it anymore. So, IE5 only sees
> 'width:150px', and uses that style. It then stops reading till after
> where the fudge ends.
>
> Other browsers will not be fooled by the fudge, and see width:120px;,
> which is what they should use, so everybody's happy.
>
> Then there is the 'make Opera 5 happy rule', see the article you just
> linked to in your reply to Jonathan.
>
> For more combinations of hacks for different versions of different
> browsers:http://centricle.com/ref/css/filters/
>
> --
> Els http://locusmeus.com/
but if I use padding:0;margin:0; do I need that hack at all? And why
IE5 needs 150px? Why not 160 for example? What is the rule of fudge
hack?
Navigation:
[Reply to this message]
|