This is an old revision of the document!


2 Spalten, feste Breite - V1

2 Spalten, feste Breite, variable Höhe, horizontal zentriert - Version 01

Gesamtbreite: 940px (links: 210px - rechts: 729px)

Autor: K.Heermann (flip-flop) http://planmatrix.de 2010/01/07
CMS-Version: >= V1.2.8
Version: V1.0 07.01.2010
Update:

Basierend auf: 2 columns layout (fixed widths) Based on Big John's Piefecta/Bruno Fassimo

Anforderung:

  • Content soll im Quelltext als erstes stehen
  • Jede Spalte kann mit einem vollflächigen Hintergrund gefüllt werden
  • Header soll am obersten Rand des Viewport stehen
  • Die Seite soll horizontal zentriert ausgegeben werden
  • Left und Main sollen optisch nebeneinander stehen
  • Footer soll unten im Viewport stehen.
  • CSS-Code soll konform sein!

Gewählt wurde hier eine feste Breite von 990px, so dass 1024 x YYY bedient werden kann.

fixed 2 cols layout by Bruno Fassino

Seitenlayout


Vorlage

<HTML> Kopf:

–> diesen Codeschnipsel in den <head> (<HTML> Kopf:) der Vorlage einstellen:

header/ Vorlage

<!--[if lt IE 8]><style>
.outer0, .wide, h2 {
    _height: 0;
    zoom: 1;
}
/* rimuove complicazione per Gecko 1.7- */
.left {
    margin-right: 0;
}
</style><![endif]-->


Haupt:

–> diesen Codeschnipsel in den Main-Teil (Haupt:) der Vorlage einstellen:

main/ Vorlage

<div class="wrapper">
 
<div class="outer1"><div class="outer0">
 
    <div class="center"><div class="incenter">
        {CONTENT}
    </div></div> <!-- end center div -->
 
    <div class="left"><div class="inleft">
        <div style="font-size:11px;" class="nav-list-ul">
           {NAV_LIST_UL:FPA,0,,act_path,active}
        </div>
        {LEFT}
    </div></div> <!-- end left div -->
 
    <br class="clear" />
</div></div>  <!-- end outer div -->
 
<div class="top"><div class="intop">
    <h1>Fixed 2 cols layout</h1>
    {HEADER}
</div></div>
 
<div class="bottom"><div class="inbottom">
    {FOOTER}
</div></div>
 
</div>


CSS

Template:

Datei: template/inc_css/fixed_2_cols_layout_brunildo.css

Width 940px (210px - 730px)

fixed_2_cols_layout_brunildo.css

/***********************************************
* Fixed 2 cols layout
* http://www.brunildo.org/test/twocols.html
* Patched version by KH (flip-flop) 06.01.2010
* Width 940px (210px - 730px)
************************************************/
 
body {
    margin: 10px 0;
    padding: 0;
    color: #000;
    background-color: #fff;
    font-family: verdana, Georgia, serif;
    font-size: 80%;
    text-align: center;
}
.clear {
    clear: both;
}
.alignright {
    text-align: right;
}
.wide {
    background-color: #ffc;
}
.top {
    border-bottom: 1px solid #000;
}
.bottom {
    border-top: 1px solid #000;
    padding-bottom: 1px;
}
.testfloat {
    width: 50px;
    border: 2px solid #f90;
    background-color: #ffd;
    font-size: .8em;
}
.to-right {
    float: right;
}
.to-left {
    float: left;
}
 
.wrapper {
    margin: 0 auto;
    width: 942px; /* 752px; */
    w\idth: 940px; /* 750px;  /* C + L + 1 */
    text-align: left;
    background-color: #cce;  /* L */
    border: 1px solid #000;
}
.outer1 {
    margin-left: 210px; /* 200px;  /* L */
    background-color: #e5e5e5;  /* C */
    border-left: 1px solid #000;
}
.outer0 {
    position: relative;
    margin-left: -211px; /*-201px; */
}
.center {
    float: right;
    width: 729px; /* 549px;  /* C */
}
.left {
    float: left;
    width: 210px; /* 200px;  /* L */
    margin-right: 1px;
}
 
/* ---- + KH Content first (Header pos absolute */
.top {
    height: 70px;       /* +KH Head height */
    width: 940px;       /* 760px; */
    position: absolute; /* +KH */
    overflow: hidden;   /* +KH */
    top: 0;             /* +KH */
    left: 0;            /* +KH */
    background-color: #ffc;
}
.intop {
    padding: 5px;
}
.bottom {
    height: 40px;            /* KH Footer height */
    background-color: #ecf;  /* +KH */
}
.inbottom {
    padding: 5px;
}
.outer1, .outer2 {
    position: relative;
    margin-top: 70px;     /* +KH (place holder header) */
}
.wrapper {
    position: relative;     /* +KH (content first) */
}
.incenter {
    padding: 10px 10px 10px 10px;
}
/* ------------------------ */
 
 
/* previene allargamento floats in IE/Mac \*//*/
* html .inleft, * html .incenter {
    width: 100%;
    overflow: hidden;
}
/**/
 
.outer0 {
    word-wrap: break-word;
}


Navigation (optional)

Datei: template/inc_css/nav_list_ul.css

Siehe auch nav_list_ul_parameter.

nav_list_ul.css

/* ======================================================================
   >= V1.30   CSS for an vertical menu
   <div class="nav-list-ul">{ NAV_LIST_UL:F,0,,act_path,active }</div>
   Level 0 - 3;
   26.03.07 flip-flop (KH)
 
========================================================================= */
 
 
.nav-list-ul {
   margin: 0;
   padding: 0;
   border: 0;
   text-decoration: none;
   /* ++ e.g. 11px font and 19px height // z.B. 11px font und 19px hoch */
   font: normal normal 11px/19px Verdana, Geneva, Arial, Helvetica, sans-serif;
   width: 210px;  /* ++ Width of Menu Items // Breite der Navigation*/
/*   float:left; */
}
 
.nav-list-ul em { font-style: normal; }
 
.nav-list-ul ul {
   margin: 0;
   padding: 0;
   border: 0;
   list-style-type: none;
   width: 210px;  /* ++ Width of Menu Items // Breite der Navigation */
}
 
.nav-list-ul ul li { position: relative; }
 
 
/* ==== Styles for Menu Items =================================== */
 
/* ==== LEVEL X ================================================= */
 
/* ====  simple link <a> // einfacher Link <a> ==== */
.nav-list-ul ul li a,
.nav-list-ul ul li a:link,
.nav-list-ul ul li a:visited,
.nav-list-ul ul li a:active {
   display: block;
   text-decoration: none;
   text-transform: none;
   color: #FFFFFF;           /* ++ Text color // Textfarbe */
 
   /* ++ background color; url of the image; image adjust e.g. left gap 10px */
   /* ++ Hintergrundfarbe; URL der Grafik  ; Grafik einrücken z.B. 10px */
   background: #81909F url(../../img/article/navi1_norm.gif) 10px 1px no-repeat;
 
   /* ++ Text adjust e.g. upper gap and left gap 25px */
   /* ++ Text justieren 1px oben und 25px von links */
   padding: 1px 0 0 25px;
 
   /* ++ bottom line if you want */
   /* ++ Untere Linie wenn gewuenscht */
   border-bottom: 1px solid #ccc; /* IE6 Bug */
 
   /* ++ Den "white-space" Fehler im IE7 vermeiden */
   /* ++ Killing the "white-space" bug in IE7 */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 185px;  /* = (Width of Menu Items) - (padding-right + padding-left) */
}
 
/* ====  Aktiv, wenn ein Sublevel vorhanden ist // active point if there is a sub_level ==== */
.nav-list-ul ul li.sub_ul_true a,
.nav-list-ul ul li.sub_ul_true a:link,
.nav-list-ul ul li.sub_ul_true a:visited,
.nav-list-ul ul li.sub_ul_true a:active {
   color: White;
   font-weight: normal;
   background: #839AAF url(../../img/article/navi1_sub_true.gif) 10px 1px no-repeat;
}
 
/* ====  Aktiver Pfad - Linkverfolgung im Baum // active path in tree (link tracing) ==== */
.nav-list-ul ul li.act_path a,
.nav-list-ul ul li.act_path a:link,
.nav-list-ul ul li.act_path a:visited,
.nav-list-ul ul li.act_path a:active {
   color: White;
   font-weight: bold;
   background: #63819F url(../../img/article/navi1_act.gif) 10px 1px no-repeat;
}
 
/* ====  Elternebene, wenn der Schalter gesetzt // Parent, if switch is set ==== */
.nav-list-ul ul li.sub_parent a,
.nav-list-ul ul li.sub_parent a:link,
.nav-list-ul ul li.sub_parent a:visited,
.nav-list-ul ul li.sub_parent a:active {
   color: White;
   font-weight: normal;
   background: #81909F url(../../img/article/navi1_norm.gif) 10px 1px no-repeat;
}
 
/* ====  active link <a> // aktiver Link <a> ==== */
.nav-list-ul ul li.active a,
.nav-list-ul ul li.active a:link,
.nav-list-ul ul li.active a:visited,
.nav-list-ul ul li.active a:active {
   color: White;
   font-weight: bold;
   background: #63819F url(../../img/article/navi1_act.gif) 10px 1px no-repeat;
}
 
/* ====  hover: Maus über Link <a> // hover link <a> ==== */
.nav-list-ul ul li a:hover {
   color: White;
/*   text-decoration: underline; */
   background: #597B8F url(../../img/article/navi1_hov.gif) 10px 1px no-repeat;
}
.nav-list-ul ul li.sub_no a:hover {
   color: White;
   background: #597B8F url(../../img/article/navi1_hov.gif) 10px 1px no-repeat;
}
.nav-list-ul ul li.sub_ul a:hover {
   background: #597B8F url(../../img/article/navi1_act_hov.gif) 10px 1px no-repeat;
}
/* ====  hover: Wenn Sublevel vorhanden <a> // hover: "if there is a sub_level" <a> ==== */
.nav-list-ul ul li.sub_ul_true a:hover {
   background: #597B8F url(../../img/article/navi1_hov.gif) 10px 1px no-repeat;
}
 
/* ====  hover: Parent Link <a> // hover: "Only for the parent link" <a> ==== */
.nav-list-ul ul li.sub_parent a:hover {
   background: #597B8F url(../../img/article/navi1_hov.gif) 10px 1px no-repeat;
}
 
/* ====  hover: Der aktive Link <a> // hover: "Only for the active link" <a> ==== */
.nav-list-ul ul li.active a:hover {
   background: #597B8F url(../../img/article/navi1_act_hov.gif) 10px 1px no-repeat;
}
 
 
/* ==== LEVEL X+1 =============================================== */
 
.nav-list-ul ul ul li.sub_no a,
.nav-list-ul ul ul li.sub_no a:link,
.nav-list-ul ul ul li.sub_no a:visited,
.nav-list-ul ul ul li.sub_no a:active,
.nav-list-ul ul ul li.sub_ul a,
.nav-list-ul ul ul li.sub_ul a:link,
.nav-list-ul ul ul li.sub_ul a:visited,
.nav-list-ul ul ul li.sub_ul a:active {
   display: block;
 
   text-decoration: none;
   text-transform: none;
 
   font-weight: normal;
   color: #FFFFFF;
   background: #8E9FAF url(../../img/article/navi1_norm.gif) 25px 1px no-repeat;
   padding: 1px 0 0 40px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 170px;  /* = (Width of Menu Items) - (padding-right + left) */
}
 
/* article navi */
.nav-list-ul ul ul li.asub_no a,
.nav-list-ul ul ul li.asub_no a:link,
.nav-list-ul ul ul li.asub_no a:visited,
.nav-list-ul ul ul li.asub_no a:active,
.nav-list-ul ul ul li.asub_ul a,
.nav-list-ul ul ul li.asub_ul a:link,
.nav-list-ul ul ul li.asub_ul a:visited,
.nav-list-ul ul ul li.asub_ul a:active {
   display: block;
 
   text-decoration: none;
   text-transform: none;
 
   font-weight: normal;
   color: #FFFFFF;
   background: #8E9FAF url(../../img/article/navi1_anorm.gif) 25px 1px no-repeat;
   padding: 1px 0 0 40px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 170px;  /* = (Width of Menu Items) - (padding-right + left) */
}
 
/* state for the active point if there is a sub_level */
.nav-list-ul ul ul li.sub_ul_true a,
.nav-list-ul ul ul li.sub_ul_true a:link,
.nav-list-ul ul ul li.sub_ul_true a:visited,
.nav-list-ul ul ul li.sub_ul_true a:active {
   color: White;
   font-weight: normal;
   background: #839AAF url(../../img/article/navi1_sub_true.gif) 25px 1px no-repeat;
}
 
/* state for the active path (link tracing) */
.nav-list-ul ul ul li.act_path a,
.nav-list-ul ul ul li.act_path a:link,
.nav-list-ul ul ul li.act_path a:visited,
.nav-list-ul ul ul li.act_path a:active {
   color: White;
   font-weight: bold;
   background: #6D8EAF url(../../img/article/navi1_act.gif) 25px 1px no-repeat;
}
 
 
/* state for the active link */
.nav-list-ul ul ul li.active a,
.nav-list-ul ul ul li.active a:link,
.nav-list-ul ul ul li.active a:visited,
.nav-list-ul ul ul li.active a:active {
   color: White;
   font-weight: bold;
   background: #6D8EAF url(../../img/article/navi1_act.gif) 25px 1px no-repeat;
}
 
.nav-list-ul ul ul li a:hover {
   color: White;
/*   text-decoration: underline; */
   background: #6B828F url(../../img/article/navi1_hov.gif) 25px 1px no-repeat;
}
.nav-list-ul ul ul li.sub_no a:hover {
   color: White;
   background: #6B828F url(../../img/article/navi1_hov.gif) 25px 1px no-repeat;
}
.nav-list-ul ul ul li.asub_no a:hover {
   color: White;
   background: #6B828F url(../../img/article/navi1_ahov.gif) 25px 1px no-repeat;
}
.nav-list-ul ul ul li.sub_ul a:hover {
   background: #6B828F url(../../img/article/navi1_act_hov.gif) 25px 1px no-repeat;
}
/* Only for "if there is a sub_level" */
.nav-list-ul ul ul li.sub_ul_true a:hover {
   background: #6B828F url(../../img/article/navi1_hov.gif) 25px 1px no-repeat;
}
 
/* Only for the active link */
.nav-list-ul ul ul li.active a:hover {
   background: #6B828F url(../../img/article/navi1_act_hov.gif) 25px 1px no-repeat;
}
 
 
/* ==== LEVEL X+2 =============================================== */
 
.nav-list-ul ul ul ul li.sub_no a,
.nav-list-ul ul ul ul li.sub_no a:link,
.nav-list-ul ul ul ul li.sub_no a:visited,
.nav-list-ul ul ul ul li.sub_no a:active,
.nav-list-ul ul ul ul li.sub_ul a,
.nav-list-ul ul ul ul li.sub_ul a:link,
.nav-list-ul ul ul ul li.sub_ul a:visited,
.nav-list-ul ul ul ul li.sub_ul a:active  {
   display: block;
   text-decoration: none;
   text-transform: none;
   font-weight: normal;
   color: #FFFFFF;
   background: #83A1BF url(../../img/article/navi1_norm.gif) 40px 1px no-repeat;
   padding: 1px 0 0 55px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 155px;  /* = (Width of Menu Items) - (padding-right + left) */
}
 
/* state for the active point if there is a sub_level */
.nav-list-ul ul ul ul li.sub_ul_true a,
.nav-list-ul ul ul ul li.sub_ul_true a:link,
.nav-list-ul ul ul ul li.sub_ul_true a:visited,
.nav-list-ul ul ul ul li.sub_ul_true a:active {
   color: White;
   font-weight: normal;
   background: #83A1BF url(../../img/article/navi1_sub_true.gif) 40px 1px no-repeat;
}
 
/* state for the active path (link tracing) */
.nav-list-ul ul ul ul li.act_path a,
.nav-list-ul ul ul ul li.act_path a:link,
.nav-list-ul ul ul ul li.act_path a:visited,
.nav-list-ul ul ul ul li.act_path a:active {
   color: White;
   font-weight: bold;
   background: #83A1BF url(../../img/article/navi1_act.gif) 40px 1px no-repeat;
}
 
 
/* state for the active link */
.nav-list-ul ul ul ul li.active a,
.nav-list-ul ul ul ul li.active a:link,
.nav-list-ul ul ul ul li.active a:visited,
.nav-list-ul ul ul ul li.active a:active {
   color: White;
   font-weight: bold;
   background: #83A1BF url(../../img/article/navi1_act.gif) 40px 1px no-repeat;
}
 
 
.nav-list-ul ul ul ul li a:hover {
   color: White;
/*   text-decoration: underline; */
   background: #6D879F url(../../img/article/navi1_hov.gif) 40px 1px no-repeat;
 
}
.nav-list-ul ul ul ul li.sub_no a:hover {
   color: White;
   background: #6D879F url(../../img/article/navi1_hov.gif) 40px 1px no-repeat;
}
.nav-list-ul ul ul ul li.sub_ul a:hover {
   background: #6D879F url(../../img/article/navi1_act_hov.gif) 40px 1px no-repeat;
}
/* Only for "if there is a sub_level" */
.nav-list-ul ul ul ul li.sub_ul_true a:hover {
   background: #6D879F url(../../img/article/navi1_hov.gif) 40px 1px no-repeat;
}
 
/* Only for the active link */
.nav-list-ul ul ul ul li.active a:hover {
   background: #6D879F url(../../img/article/navi1_act_hov.gif) 40px 1px no-repeat;
}
 
 
/* ======================================================================
   >= V1.4.4 r387   CSS for a article navigation menu
   <div class="nlu_navi1">{ NAV_LIST_UL:FA,0,,act_path,active }</div>
   Level 0 - 3;
   28.12.09 flip-flop (KH)
 
========================================================================= */
.nav-list-ul ul li.asub_no a,
.nav-list-ul ul li.asub_no a:link,
.nav-list-ul ul li.asub_no a:visited,
.nav-list-ul ul li.asub_no a:active {
   display: block;
   text-decoration: none;
   text-transform: none;
   font-weight: normal;
   color: #FFFFFF;
   background: #83A1BF url(../../img/article/navi1_anorm.gif) 10px 1px no-repeat;
   padding: 1px 0 0 25px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 185px;  /* = (Width of Menu Items) - (padding-right + left) */
}
.nav-list-ul ul ul li.asub_no a,
.nav-list-ul ul ul li.asub_no a:link,
.nav-list-ul ul ul li.asub_no a:visited,
.nav-list-ul ul ul li.asub_no a:active {
   display: block;
   text-decoration: none;
   text-transform: none;
   font-weight: normal;
   color: #FFFFFF;
   background: #83A1BF url(../../img/article/navi1_anorm.gif) 25px 1px no-repeat;
   padding: 1px 0 0 40px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 170px;  /* = (Width of Menu Items) - (padding-right + left) */
}
 
.nav-list-ul ul ul ul li.asub_no a,
.nav-list-ul ul ul ul li.asub_no a:link,
.nav-list-ul ul ul ul li.asub_no a:visited {
   display: block;
   text-decoration: none;
   text-transform: none;
   font-weight: normal;
   color: #FFFFFF;
   background: #83A1BF url(../../img/article/navi1_anorm.gif) 40px 1px no-repeat;
   padding: 1px 0 0 55px;
   border-bottom: 1px solid #ccc; /* IE6 Bug */
   \width: 210px;  /* IE5x Opera <= 5 */
   widt\h: 155px;  /* = (Width of Menu Items) - (padding-right + left) */
}
 
/* state for the active link */
.nav-list-ul ul li.asub_no.active a,
.nav-list-ul ul li.asub_no.active a:link,
.nav-list-ul ul li.asub_no.active a:visited,
.nav-list-ul ul li.asub_no.active a:active {
   color: White;
   font-weight: bold;
   background: #83A1BF url(../../img/article/navi1_aact.gif) 10px 1px no-repeat;
}
/* state for the active link */
.nav-list-ul ul ul li.asub_no.active a,
.nav-list-ul ul ul li.asub_no.active a:link,
.nav-list-ul ul ul li.asub_no.active a:visited,
.nav-list-ul ul ul li.asub_no.active a:active {
   color: White;
   font-weight: bold;
   background: #83A1BF url(../../img/article/navi1_aact.gif) 25px 1px no-repeat;
}
/* state for the active link */
.nav-list-ul ul ul ul li.asub_no.active a,
.nav-list-ul ul ul ul li.asub_no.active a:link,
.nav-list-ul ul ul ul li.asub_no.active a:visited,
.nav-list-ul ul ul ul li.asub_no.active a:active {
   color: White;
   font-weight: bold;
   background: #83A1BF url(../../img/article/navi1_aact.gif) 40px 1px no-repeat;
}
 
.nav-list-ul ul li.asub_no a:hover {
   color: White;
   background: #6D879F url(../../img/article/navi1_ahov.gif) 10px 1px no-repeat;
}
.nav-list-ul ul ul  li.asub_no a:hover {
   color: White;
   background: #6D879F url(../../img/article/navi1_ahov.gif) 25px 1px no-repeat;
}
.nav-list-ul ul ul ul li.asub_no a:hover {
   color: White;
   background: #6D879F url(../../img/article/navi1_ahov.gif) 40px 1px no-repeat;
}
/* ===END=== Article navigation  */
 
/* Nur Home darstellen */
/* .nav-list-ul ul li.sub_ul {display: none;} */
 
/*==== END LEVEL X ============================================= */
 
/* Holly Hack. IE Requirement \*/
* html .nav-list-ul ul li { float: left; height: 1%; }
* html .nav-list-ul ul li a { height: 1%; }
 
/* ==== End  nav-list-ul ========================================= */
deutsch/templates/big-john-piefecta/2-spalten-feste-breite-variable-hoehe-v1.1262867468.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0