From IT Skills
Important for layouting[edit | edit source]
- float: left or right (it is normal to reverse <il> order when float:right)
- if child has float: set then child does not influence on parent's height
- display: block, inline, inline-block or flex
- width и height не работает для строчных элементов. Используйте display: inline-block
- inline elements are aligned by container's text-align:
- flexbox-лейаут не зависит от направления в отличие от обычных лейаутов (блоки, располагащиеся вертикально, и инлайн-элементы, располагающиеся горизонтально)
- absolute allows place any page element exactly relative to the next parent element with relative (or absolute) positioning or <html>. An element with this type of positioning is not affected by other elements and it doesn't affect other elements.
- fixed is fairly rare but certainly has its uses. A fixed position element is positioned relative to the viewport, or the browser window itself. The viewport doesn't change when the window is scrolled.
- it breaks down the popular belief that line-height is the distance between baselines. In CSS, it is not... The content-area is therefore always on the middle of the virtual-area. Based on its computed value, the line-height (virtual-area) can be equal, taller or smaller than the content-area. In case of a smaller virtual-area, leading is negative and a line-box is visually smaller than its children.... the problem we’re still facing is how much the line-height’s normal value is? And the answer, as for the computation of the content-area’s height, is to be found inside the font metrics... It becomes obvious that setting line-height: 1 is a bad practice. I remind you that unitless values are font-size relative, not content-area relative, and dealing with a virtual-area smaller than the content-area is the origin of many of our problems.
This category has the following 4 subcategories, out of 4 total.