I'm developing a css/xhtml template to investigate how we should develop web pages to be completely compliant with these standards.
My positioned content layout example is completely XHTML1.1 compliant. Unfortunately there are a number of unresolved problems which make this code unusable:
1. Internet Explorer 6 does not obey the min-width CSS on the BODY and BodyContent (I can live with that).
2. Firefox obeys the min-widths but does not display a horizontal scrollbar when the browser is too narrow (this is a problem).
3. No browsers obey the overfolw:scroll CSS on the BodyContent (the body text disapears off the bottm of the DIV when the page is browser is too small) - a big problem.
4. The body text is flowing outside the right-margin in Firefox (thus being hidden by column 3) - no idea why, an annoying problem.
Can anybody offer any solutions to these problems (should all be in the CSS), or offer any better way of accomplising this (without using tables which should not be used in XHTML 1.1 for creating layout, only for tabular data display)?
Thanks in advance - Julian
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>XHTML Postioned Content 2</title>
<style type="text/css">
html,body {height:100%; width:100%; margin:0; padding:0; overflow:hidden; min-width:780px}
body,td {font-family:Arial; font-size:13px}
h1 {font-size:20px; font-weight:bold; margin-top:0}
p {text-align:justify}
/* HEADER */
#siteLogo {position:absolute; top:0; left:0; z-index:4; width:200px; line-height:50px; background:yellow; display:table-cell; vertical-align:middle}
#strapline {position:absolute; top:0; left:0; z-index:3; width:100%; line-height:50px; background:red; padding:0 100px 0 200px; vertical-align:middle}
#langauges {position:absolute; top:0; right:0; z-index:4; width:100px; line-height:50px; background:gray; text-align:center; vertical-align:middle}
/* BODY */
#navigation {position:absolute; top:0; left:0; z-index:2; width:200px; height:100%; background:gray; padding:50px 0 25px 0}
#bodyContent {position:absolute; top:0; left:0; z-index:1; width:100%; height:100%; background:yellow; padding:60px 110px 35px 210px; overflow:scroll; min-width:480px}
#advertising {position:absolute; top:0; right:0; z-index:2; width:100px; height:100%; background:red; padding:50px 0 25px 0; text-align:center}
/* FOOTER */
#tradeLogo {position:absolute; bottom:0; left:0; z-index:4; width:200px; line-height:25px; background:yellow; vertical-align:middle}
#copyright {position:absolute; bottom:0; left:0; z-index:3; width:100%; line-height:25px; background:red; padding:0 100px 0 200px; vertical-align:middle}
#pageTopLink {position:absolute; bottom:0; right:0; z-index:4; width:100px; line-height:25px; background:gray; text-align:center; vertical-align:middle}
</style>
</head>
<body>
<!-- HEADER -->
<div id="siteLogo">Site Logo</div>
<div id="strapline">Strapline</div>
<div id="langauges">Langauges</div>
<!-- BODY -->
<div id="navigation">Navigation</div>
<div id="bodyContent">
<h1>Body Content</h1>
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.</p>
<p>Accumsan et iusto dignissuim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Eros Et Accumsan dignissim qui blandit prasent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Nam tempor cum soluta nobis eleifend option congue hihil imperdiet doming id quod mazim placerat facer possim assum. Accumsan et iusto osio dignissim qui blandit. Vendrerit In Vulputate Duis autem ver eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel ilum dolore eu feugait nulla facilisi at vero eros et accumsan et iusto odio. Occumsan Aliquam dignissim qui blandit prasent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifen option congue nihil imperdiet doming id quod mazim placerat facer possim assum.</p>
</div>
<div id="advertising">Advertising</div>
<!-- FOOTER -->
<div id="tradeLogo">Trade Logo</div>
<div id="copyright">Copyright</div>
<div id="pageTopLink">Page Top Link</div>
</body>
</html>