CCT286H5 Chapter 15: Week 3 - Duckett Chapter 15: Layout
Document Summary
Layout block-level - elements start on new line inline - elements apparent between/in surrounding elements/text containing/parent - the outer box when one block level element sits inside another block-level element. When you move any element from normal flow, boxes can overlap. The z-index property allows you to control which box appears on top. The higher the number, the closer it is to the front. Example p . example { position : relative; top : 10px ; left : 100px ; clear - no element should touch the left or right hand sides of a box. Left - left hand side should not touch. Right - right hand side should not touch. Both - both sides should not touch. If a containing element only contains oated elements, some browsers will treat it as if it is zero pixels tall. To fix this, place the elements inside another box.