| |
CSS Positioning -- Where an element should be laid |
|
|
Subject: CSS Positioning -- Where an element should be laid
Author: CyberSpider
Posted on: 04/17/2016 12:00:38 AM
Where should I put this element? This is the most fundamental question you have to ask yourself while you are laying out your webpage.
Positioning an block-level element involves the following CSS properties:
top -- auto, 20px, 5.0em, 10%; right -- auto, 20px, 5.0em, 10%; bottom -- auto, 20px, 5.0em, 10%; left -- auto, 20px, 5.0em, 10%; z-index -- auto, -1, 0, 1; position -- static, relative, absolute, fixed.
z-index specifies the priority to display in case of overlap. The box with bigger value will be shown on top of the other. The values of top, right, bottom and left, however, can be interpreted by browser differently depending on position.
Replies:
References:
|
|
|
|