Ido Dekkers wrote:
>>> which of the above has the bug :
>>> http://test.dekkers.net/test.aspx
> the question is which of them has the bug (if it's a bug) and can it
> be fixed in css ?
Yes, it can be fixed in CSS, *if* you use proper *positions* as
starting-points for 'position: absolute'.
You're still positioning "out of thin air" with margins, which is not
how you should absolute position elements to go with a fix-sized
background.
In fact: I can not see any good reason for using 'margins' in
combination with 'position: absolute' at all in your case, as
'top:??px;' and 'left:??px;' will achieve pixel-perfect results for
absolute positioning across the entire browser-land - regardless of
dir="rtl" vs. dir="ltr".
Example:
#logo
{
position:absolute;
/* margin:-80px 800px 0 0; */
top: 10px;
left: 100px;
}
...will position that logo in _exactly_ the same spot in _all_ browsers
that understands absolute positioning - which should cover all CSS1
capable ones. The margins are commented out - not in use, so you may as
well delete them before going on with similar positioning for the other
overlaid elements. Success is guaranteed.
> regarding IE - i always leave the css code breaking for the last in a
> separate file.
Fine, although I can't see any good reason for that either in this case,
as IE6 has just "told me" that there are 'collapsing margins' problems
in there, and they should be dealt with at an early stage if you want to
avoid covering up for designer-bugs instead of browser-bugs across
browser-land.
IE6' basic flaws and bugs can provide a lot of information about
design-weaknesses, although we cannot follow IE's lead when it comes to
solving them.
Add...
#header
{
padding-top: 1px;
}
...to see the 'collapsing margin' from...
#nav
{
margin: 10px;
width: 90%;
}
...in Firefox and Opera too. That's the 10px top margin that IE6 is
preventing from collapsing onto body because of the infamous
'hasLayout'[1] bug - resulting in 10px offset for the #nav in IE6.
You'll have to decide how that margin shall be handled across
browser-land, but you can't affect how IE6 is handling it since you
can't get rid of the 'hasLayout' bug.
So, you're definitely not fighting browser-bugs here - apart from in
IE/win. You just need to apply proper positioning.
regards
Georg
[1]http://www.satzansatz.de/cssd/onhavinglayout.html
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/