[solved] CSS gurus' help required

About the template and stylesheet - and changing the menu
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

[solved] CSS gurus' help required

Post by cmb » Sat Oct 08, 2011 12:25 am

Hello CSS gurus,

I have a problem with a "simple" layout:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>title</title>
</head>
<body>
    <h1>title</h1>
    <div style="width:110px;overflow:scroll">
    <div style="width:300px">
    <div style="position:relative;float:left;background:red;width:100px;height:100px">
	<div style="position:absolute;top:10px;left:10px">hllo</div>
    </div>
    <div style="position:relative;float:left;background:green;width:100px;height:100px">
	<div style="position:absolute;top:10px;left:10px">hllo</div>
    </div>
    <div style="position:relative;float:left;background:blue;width:100px;height:100px">
	<div style="position:absolute;top:10px;left:10px">hllo</div>
    </div>
    </div>
    </div>
</body>
</html>
It renders as expected (a small square box with a scroll bar) in current versions of FF, Chrome, Opera and IE. But in IE6/7 it doesn't, until I force quirks mode :!: I'm totally confused :?

Could somebody please explain what I did wrong.

Christoph

PS: According to http://www.quirksmode.org/bugreports/ar ... raint.html this is a bug in IE6/7, but it seems that the workaround posted by Dusty is a viable solution.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply