css position - CSS Positioning - Two Column Div Layout with Two fixed top DIVs -
i attempting put webpage layout following elements: 1. 2 column setup menu on left , main content on right. 2. "function bar" fixed top of right column. fixed , visible.
here catches:
- i want 2 columns scroll independently of each other if height pushes past browser window resolution
- the content managment system use adds fixed pane top of page show control options
i have crafted image gives visual representation of layout after. hope helps make sense.
here's i'm @ in attempting create layout
<div class="cms-admin-bar"></div> <div class="total-wrapper"> <div class="left-pane"> <div class="menu-pane"></div> </div> <div class="right-pane"> <div class="function-pane"></div> <div class="content-pane"></div> </div> </div> .cms-admin-bar{ position:fixed; height:43px; left:0; top:0; width:100%; z-index:10; } .total-wrapper{ position:relative; } .left-pane{ position:absolute; top:0; bottom:0; left:0; height:100%; width:283px; z-index:8; } .right-pane{ position:fixed; top:0; left:283px; right:0; bottom:0; overflow:auto; } .function-pane{ position:fixed; z-index:8; top:0px; left:283px; height:43px; }
with css have few problems:
- the "cms-admin-bar" covers "function-pane" when admin logged in.
- the "function-pane"'s right 283px being cut off. need fixed div fit in screen, while still having fluid width.
i hope descriptive enough. , time!
alex
check out this: http://codepen.io/anon/pen/kehny updated again
the "cms-admin-bar" covers "function-pane" when admin logged in. need find height of cms-admin-bar , add padding parent element (might body case) or add top margin total-wrapper element.
the "function-pane"'s right 283px being cut off. need fixed div fit in screen, while still having fluid width. seems works in pen now. note layout isn't responsive though.
Comments
Post a Comment