Hi All, I hope this isn't something that's come up before. Seeing as it's not in the lists of usual bugs in browsers, I'm guessing it might be my ignorance rather than a poorly implemented recommendation. I hope someone can enlighten me as it's something that's repeatedly come up and I've never found a way around it other than the one I'll outline which isn't what I want at all...
I've built a proof of concept. See link below.... http://www.tonyhaddon.com/cssbug/test.html Markup here is.... ------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd "> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> @import url('includes/cssbug.css'); </style> <title>Test Page</title> </head> <body> <div id="outer"> <div id="inner"> <h1>Header</h1> </div> </div> </body> </html> ------------------------------------------------------------------------- And my CSS is: body { background: #cccccc; padding: 0; margin: 0; } #outer { width: 900px; background: #ffffff; } #inner { height: 100px; /*border: solid 1px;*/ } h1 { margin: 50px 0 0 10px; padding: 0; background-color: Red; } ------------------------------------------------------------------------- My problem lies in the margin I've applied to the h1 element here. It ought to offset the h1 block from the containing #inner element. In IE6 it works as planned, but Firefox appears to apply the margin to the element two steps up the tree e.g. the #outer element. The only fix I have been able to find is putting a border on the #inner element (see example at http://www.tonyhaddon.com/cssbug/test2.html)<http://www.tonyhaddon.com/cssbug/test2.html>. This seems to apply the padding in all the right places... but now I have a border on my #inner that I don't want! Can anyone make any suggestions? Thanks in advance Tony ______________________________________________________________________ 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/
