PDA

View Full Version : Layout question - Things show different in IE than FF



Specks
25 May 2007, 2:56 PM
I was running the document and examples application and I took code from the complex layout section and played around with it. I like seeing how everything goes together. One thing I noticed is that with the code I put in the post it seems to display differently in FF than it does in IE.

Here's the JavaScript.


Ext.onReady(
function() {
var layout = new Ext.BorderLayout( document.body, {
north: {
split: false,
initialSize: 32,
titlebar: true
},
});

layout.beginUpdate();
layout.add('north', new Ext.ContentPanel('north', 'North Test'));
layout.endUpdate();
}
);


and here's the HTML.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>North Test</title>
<!-- css -->
<link rel="stylesheet" type="text/css" href="js/Ext/resources/css/ext-all.css" />
<!-- /css -->
<!-- javascript -->
<script type="text/javascript" src="js/Ext/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="js/Ext/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="js/Ext/ext-all.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<!-- /javascript -->
</head>

<body>
<div id="container">
<div id="north">Test</div>
</div>
</body>
</html>



In FF the title bar seems to show up. However in IE 7 its missing. Is this a problem with IE or with my code?

Thanks

tryanDLS
25 May 2007, 3:33 PM
The first thing that's probably causing you problems is lack of a center region - you always have at least 2 regions and 1 has to be center.