CSS Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.Anti-spam check. Do not fill this in! ===Positioning=== CSS 2.1 defines three positioning schemes: ; Normal flow: ''Inline'' items are laid out in the same way as the letters in words in the text, one after the other across the available space until there is no more room, then starting a new line below. ''Block'' items stack vertically, like paragraphs and like the items in a bulleted list. Normal flow also includes the relative positioning of block or inline items and run-in boxes. ; Floats: A floated item is taken out of the normal flow and shifted to the left or right as far as possible in the space available. Other content then flows alongside the floated item. ; Absolute positioning: An absolutely positioned item has no place in, and no effect on, the normal flow of other items. It occupies its assigned position in its container independently of other items.<ref name="W3C-positioning">{{cite web|last=Bos|first=Bert|title=9.3 Positioning schemes|url=https://www.w3.org/TR/CSS2/visuren.html#positioning-scheme|work=Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification|publisher=W3C|access-date=16 February 2011|date=7 December 2010|display-authors=etal|archive-url=https://web.archive.org/web/20110218054848/https://www.w3.org/TR/CSS2/visuren.html#positioning-scheme|archive-date=18 February 2011|url-status=live}}</ref> ====Position property==== There are five possible values of the <syntaxhighlight lang="CSS" inline>position</syntaxhighlight> property. If an item is positioned in any way other than <syntaxhighlight lang="CSS" inline>static</syntaxhighlight>, then the further properties <syntaxhighlight lang="CSS" inline>top</syntaxhighlight>, <syntaxhighlight lang="CSS" inline>bottom</syntaxhighlight>, <syntaxhighlight lang="CSS" inline>left</syntaxhighlight>, and <syntaxhighlight lang="CSS" inline>right</syntaxhighlight> are used to specify offsets and positions.The element having position static is not affected by the <syntaxhighlight lang="css" inline="">top</syntaxhighlight>, <syntaxhighlight lang="css" inline="">bottom</syntaxhighlight> , <syntaxhighlight lang="css" inline="">left</syntaxhighlight> or <syntaxhighlight lang="css" inline="">right</syntaxhighlight> properties. =====Static===== The default value places the item in the ''normal flow''. =====Relative===== The item is placed in the ''normal flow'', and then shifted or offset from that position. Subsequent flow items are laid out as if the item had not been moved. =====Absolute===== Specifies ''absolute positioning''. The element is positioned in relation to its nearest non-static ancestor. =====Fixed===== The item is ''absolutely positioned'' in a fixed position on the screen even as the rest of the document is scrolled<ref name="W3C-positioning"/> ====Float and clear==== The {{Code|float|css}} property may have one of three values. ''Absolutely'' positioned or ''fixed'' items cannot be floated. Other elements normally flow around floated items, unless they are prevented from doing so by their {{Code|clear|css}} property. ;left: The item ''floats'' to the left of the line that it would have appeared in; other items may flow around its right side. ;right: The item ''floats'' to the right of the line that it would have appeared in; other items may flow around its left side. ;clear: Forces the element to appear underneath ('clear') floated elements to the left ({{code|lang=css|code=clear:left}}), right ({{code|lang=css|code=clear:right}}) or both sides ({{code|lang=css|code=clear:both}}).<ref name="W3C-positioning"/><ref>{{cite book|last=Holzschlag|first=Molly E|author-link=Molly Holzschlag|title=Spring into HTML and CSS|year=2005|publisher=Pearson Education, Inc|isbn=0-13-185586-7}}</ref> Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page