Sent by Plagiarist.com on 7 April 2002 19:07
At 11:31 PM 4/6/02 -0800, Big John wrote:
>It's just typical cruddy IE bugs.
>First, declare a width in .foreground. I tried %, em,
>and px units and they all worked. I'll bet
>absolute positioning would work as well.
I'm having a problem with this, though. Theoretically, if I set the left &
right margins to 5%, padding to 5%, and the width to 80%, the box should be
centered on the browser window with 5% margin on both sides. This works
correctly in Netscape and Opera 6, but IE6 still renders the width as
though I asked it to only extend 80% of the way across the window, plus 5%
padding - so the right margin actually winds up being about 25%, plus the
padding. That's 30% margin in this case, where the other browsers (that
are the minority, sadly) render the page correctly.
The Tantek Celik hack (see the http://www.plagiarist.com/test/boxes.php for
the hack - I think I lifted the comments on it directly from Eric Meyer,
although I could be wrong) makes it work in IE5 (and thereby every other
browser but IE6) - but it still doesn't work in IE6, which is growing to be
the big boy on the block (i.e. the 800 lb. gorilla).
>Second, don't use 'margin-right'in .sidebar; IE don't
>like that one. Ya know, there's a crazy kinda logic in
>the IE bug suite. >:|
margin-right seems to work gangbusters when you specify *negative* margins,
but not positive values.
>Finally, I used a strict type doctype, which made the page
>render correctly, percentagewise, and did no visible harm
>to the layout.
Yes, specifying a strict doctype finally DOES render the page correctly in
IE6 (and every "standards compliant" browser). Sadly, and I'm about to cry
here, the "real" pages I need to use this technique on won't validate to
strict, and I can't re-write it to do so because of the nature of passing
PHP values (the "strict" doctype won't allow "&" characters passed through
an href link - unless someone can tell me how to do this - using the entity
name "&" breaks the variable in PHP).
>I gotta say that's some clean code you got
Thanks, but it's easy to code "cleanly" when you bang it out in fifteen
minutes in a plain text editor. ;)
Okay, well, Big John is now officially Big "Super Cool" John in my
book. Thanks for your help. It's been an education.
|Plagiarist Poetry Archive | Mature poets steal. |
|http://www.plagiarist.com | -- T.S. Eliot |
| | [EMAIL-REMOVED] |