| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <rml>
- <head>
- <title>Shrink-to-fit 2</title>
- <link type="text/rcss" href="../style.rcss"/>
- <link rel="help" href="https://www.w3.org/TR/CSS21/visudet.html#shrink-to-fit-float" />
- <meta name="Description" content="Shrink-to-fit width with differently positioned and floated boxes." />
- <style>
- body {
- background: #ddd;
- color: #444;
- }
- hr {
- margin-top: 15dp;
- margin-bottom: 15dp;
- background-color: #ccc;
- }
- div {
- border: 2dp #444;
- background: #ccf;
- }
- body > div {
- display: inline-block;
- position: relative;
- /*overflow: auto;*/
- }
- body > div > div {
- width: 150dp;
- height: 30dp;
- background: #cfc;
- }
- .absolute {
- position: absolute;
- top: 20dp;
- left: 50dp;
- }
- .relative {
- position: relative;
- top: 20dp;
- left: 50dp;
- }
- .float-left {
- float: left;
- }
- .float-right {
- float: right;
- }
- </style>
- </head>
- <body>
- <div>
- Some text
- <div>Block</div>
- Text after
- </div>
- <hr/>
- <div>
- Some text
- <div class="absolute">Absolute</div>
- Text after
- </div>
- <hr style="margin-top: 55dp;"/>
- <div>
- Some text
- <div class="relative">Relative</div>
- Text after
- </div>
- <hr/>
- <div>
- Some text
- <div class="float-left">Float left</div>
- Text after
- </div>
- <hr/>
- <div>
- Some text
- <div class="float-right">Float right</div>
- Text after
- </div>
- <hr/>
- <div>
- <div class="float-left">Float left</div>
- Text after
- </div>
- <hr/>
- <div>
- <div class="float-right">Float right</div>
- Text after
- </div>
- <hr/>
- <div>
- Some text
- <div class="float-left relative">Float relative</div>
- Text after
- </div>
- </body>
- </rml>
|