Elements flow automatically one after the other in lines and blocks : position static « Layout « HTML / CSS

HTML / CSS
1. Background Attributes
2. Basic Attributes
3. Basic Tags
4. Box Model
5. CSS Attributes and Javascript Style Properties
6. CSS Controls
7. Form Attributes
8. Form Style
9. Form Tags
10. Frame Attributes
11. Frame Tags
12. HTML
13. IE Firefox
14. Images
15. Layout
16. Layout Attributes
17. Link Attributes
18. Link Tags
19. List Attributes
20. List Style
21. List Tags
22. Marquee Attributes
23. Meta Tags
24. Microsoft Attributes
25. Object Attributes
26. Object Tags
27. Reference
28. Style Basics
29. Styles Tags
30. Table Attributes
31. Table Style
32. Table Tags
33. Text
34. Text Attributes
35. Text Tags
36. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
HTML / CSS » Layout » position static 
Elements flow automatically one after the other in lines and blocks
 



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css" media="Screen">
span {
  position: static;
  margin: 40px;
  line-height: 32px;
  padding: 3px;
  border: 2px solid black;
  background-color: yellow;
}

#sizedStaticBlock {
  position: static;
  width: 120px;
  height: 100px;
  margin: 10px auto;
  background: red;
  
}

#myStyle {
  position: static;
  width: auto;
  height: auto;
  margin: 10px 50px;
  background: blue;
}
.parent{
   width: 600px;
   height: 600px;
   background: gold;
}
</style>
</head>
<body>
  <div class="parent">Non-positioned Parent 
    <div id="sizedStaticBlock" class="box">Sized Static Block </div> 
    <div id="myStyle" class="box">Stretched Static Block</div> 
    <div class="box"> <span>Shrinkwrapped Static Inline</span> 
    <span>Shrinkwrapped Static Inline</span> 
    </div>
  </div>
</body>
</html>

 
Related examples in the same category
1. static position and relative position
2. Using Static Positioning
3. width:auto stretches a static block
4. setting width to a value, margin-left to auto, and margin-right to auto centers a static block
5. Static Positioned
6. use position:static to unposition an element so that it is rendered normally in the flow.
7. Stacking Context
8. Stretched Absolute
9. Sized Static Block left offset
10. Stretched Static Block left offset
11. Sized Static Block centered aligned
12. Stretched Static Block center aligned
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.