html - CSS 3 column fluid layout issues, 3rd column too wide -
i've been trying implement 3 column fluid layout following http://www.alistapart.com/articles/holygrail/ (left 300px fixed, center fluid, right 300px fixed) , reason 3rd column blowing out right side of layout.
here's want vs i'm getting: http://i.stack.imgur.com/qfvvp.png
am testing on linux chrome , ff - both latest stable versions.
my css is:
#home { min-width:900px; font-family: arial; font-size: 12px; color: #565656; } /* main page divisions */ #page-top { height: 120px; background-color: #ffffffff; } #page-middle { height: 250px; background-color: #6ac0eb; float:left; width:100%; padding-left: 300px; /* lc width */ padding-right: 300px; /* rc width */ } #page-middle .column { position: relative; float: left; } #page-bottom { clear:both; height: 300px; background-color:#ededed; overflow:scroll; } /* middle page divisions */ #page-middle-centre { width:60%; } #page-middle-left { width: 300px; /* lc width */ right: 300px; /* lc width */ margin-left: -60%; } #page-middle-right { width: 300px; /* rc width */ margin-right:-300px; /* rc width */ background: #fde95e; } /* bottom page divisions */ #page-bottom-left { width: 49%; float:left; text-align: right; } #page-bottom-right { width: 49%; float:right; text-align: left; } h2 { font-family: "quicksand"; font-size: 130%; } h1#title-block { font-family: "quicksand"; font-size: 3em; color: #ffffff; letter-spacing:-3px; }
and html follows:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>test layout</title> <link rel="stylesheet" type="text/css" href="reset.css" /> <link rel="stylesheet" type="text/css" href="test.css" /> <!--[if ie]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body id="home"> <div id="page-top"> header </div> <div id="page-middle"> <div id="page-middle-centre" class="column"> middle section middle section middle section middle section middle section middle section middle section middle section </div> <div id="page-middle-left" class="column"> <h1 id="title-block">title block</h1> <p id="quicksand">menu 1 | menu 2 | menu 3 | menu 4</p> </div> <div id="page-middle-right" class="column"> right section right section right section right section right section right section right section right section </div> </div> <div id="page-bottom"> footer </div> </body> </html>
in html column divs in order of:
- left column
- center column
- right column
the example using on alistapart site has columns in order of:
- center column
- left column
- right column
switch these around , might work properly. luck!
Comments
Post a Comment