So I am creating a web page, where the menus on the left hand side are fixed (They follow you when you scroll up and down the page). I am currently using The Grid layout: Foundation (by zurb) http://foundation.zurb.com/docs/grid.php. Which uses a twelve column grid. I am having problems positioning the fixed layout and still using the grid at the same time. How can I use a grid layout and fixed elements on a page?
<div class="container">
<div class="row">
<div class="four columns relativePosition">
<div class="fixedPosition">
<div class="four columns">
Menu Here
</div>
</div>
</div>
<div class="eight columns">
Other Content
</div>
</div>
</div>
I was able to get the fixed position to work using this structure but in some cases the contents of the menu grows too big and overlap the contents of the eight column. I dont know if there is a better way to doing this?
10% of 1200px = 120px
. This is because elements withposition:fixed
have their width calculated with respect to the viewport, not the parent divs. Whereas anything which is not fixed position will get a width of10% of 1000px = 100px
. – Cello