Dopo un po' di tentativi sono riuscito ad ottenere il layout desiderato:
CSS
codice:
* html body{ /*IE6 hack*/ padding: 0 150px 0 200px; /*Set value to (0 WidthOfRightFrameDiv 0 WidthOfLeftFrameDiv)*/}
* html #maincontent{ /*IE6 hack*/ height: 100%; width: 100%; }
body {margin:0; padding:0; border: 0; overflow: hidden; /*height: 100%;*/ max-height: 100%; background:white; }
#header {position: absolute; top: 0; left: 0; width: 100%; height: 90px; overflow: hidden; background:#fffff3 url(../../img/header.jpg) no-repeat; color: black}
/*----------------- GLOBAL LINKS -----------------*/
#linkMenu
{
position:absolute;
/*float:right;*/
line-height:0.9em;
top:10px;
right:20px;
text-align:right;
}
#linkMenu ul
{
width:190px;
margin:0;
padding:0;
}
#linkMenu ul li
{
display:inline;
list-style: none;
margin:0;
padding:0;
}
#linkMenu ul li a
{
display:inline;
padding:2px;
text-decoration: none;
}
/*---------------------------------------*/
/*#headertop {height:60px; font:22pt Corbel; color:white; padding-left:20px; padding-top:26px; margin-bottom:0px} */
#maincontainer {position: absolute; top: 90px; left: 0; right: 0; bottom: 0; overflow: auto;/* <---*/ background: #fff}
#framecontentLeft, #framecontentRight{height: 100%; overflow: hidden; background-color:#efefac; color:black; font:7.5pt verdana; line-height:13px}
#framecontentLeft{ position: absolute; top: 0px; left: 0; width:230px; background-color:#efefac;}
#framecontentRight{ position: absolute; left: auto; right: 0; width: 250px; background-color:#ffff99;}
#maincontent{ position:fixed; top:90px; left:230px; right:250px; bottom:0; /*overflow:auto; <-- Cuase the scroll bar in the content area*/ background:white; font:8pt verdana; line-height:150%; border-right:1px dashed #e0e0e0}
.innertube{margin: 15px; /*Margins for inner DIV inside each DIV (to provide padding)*/}
HTML:
codice:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="COLS3.aspx.cs" Inherits="COLS3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSS Left and Right Frames Layout</title>
<link rel="Stylesheet" type="text/css" href="App_Themes/general_theme/3COLS.css" />
<script type="text/javascript">
var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"]
function filltext(words){
for (var i=0; i<words; i++)
document.write(gibberish[Math.floor(Math.random()*3)]+" ")
}
</script>
</head>
<body>
<div id="header">
<div id="linkMenu">
<ul>[*]Home | [*]link A[*]link B[/list]
</div>
</div>
<div id="maincontainer">
<div id="framecontentLeft">
<div class="innertube">
<script type="text/javascript">filltext(22)</script></p>
</div>
</div>
<div id="framecontentRight">
<div class="innertube">
<%----%>
<script type="text/javascript">filltext(22)</script></p>
</div>
</div>
<div id="maincontent">
<div class="innertube">
<h2>Dynamic Drive CSS Library</h2>
<script type="text/javascript">filltext(35)</script></p>
Credits: Dynamic Drive CSS Library</p>
</div>
</div>
</div>
</body>
</html>
In questo modo riesco anche ad avere le colonne fino a fine pagina. In particolare per quest'ultimo aspetto avevo risolto impostando (in altri layout) haieght:100% per i vari container. Tuttavia nel caso di header veniva creata la scroll bar anche se non necessaria e lo spazio "sotto" la pagina era esattamente la prozione occupata dall'header.
Come sarebbe possibile evitare questo? C'è una soluzione generale (Tipo usare margin-bottom negativi)?
Grazie