|
|
@@ -0,0 +1,91 @@
|
|
|
+<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" />
|
|
|
+ <style>
|
|
|
+ body {
|
|
|
+ background: #ddd;
|
|
|
+ color: #444;
|
|
|
+ }
|
|
|
+ body > div {
|
|
|
+ clear: both;
|
|
|
+ position: relative;
|
|
|
+ height: 50px;
|
|
|
+ }
|
|
|
+ .absolute
|
|
|
+ {
|
|
|
+ position: absolute;
|
|
|
+ top: 10em;
|
|
|
+ left: 2em;
|
|
|
+ right: auto;
|
|
|
+ height: 22dp;
|
|
|
+ padding: 4dp 5dp;
|
|
|
+ color: white;
|
|
|
+ background-color: #888;
|
|
|
+ font-size: 15dp;
|
|
|
+ }
|
|
|
+ .x
|
|
|
+ {
|
|
|
+ position: absolute;
|
|
|
+ top: 5em;
|
|
|
+ left: 10px;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ .close
|
|
|
+ {
|
|
|
+ margin-left: 10dp;
|
|
|
+ z-index: 1;
|
|
|
+ float: right;
|
|
|
+ width: 18dp;
|
|
|
+ color: black;
|
|
|
+ background-color: #ddd;
|
|
|
+ border-width: 1px;
|
|
|
+ border-color: #666;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .close:hover
|
|
|
+ {
|
|
|
+ background-color: #eee;
|
|
|
+ }
|
|
|
+ .close:active
|
|
|
+ {
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ /*width: 280dp;*/
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .button
|
|
|
+ {
|
|
|
+ font-size: 0.9em;
|
|
|
+ margin-left: 3dp;
|
|
|
+ z-index: 1;
|
|
|
+ float: right;
|
|
|
+ width: 18dp;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #666;
|
|
|
+ border-width: 1px;
|
|
|
+ border-color: #ccc;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body id="test">
|
|
|
+<p>The following boxes should all appear the same, with the background and border tightly packed around the word 'BOX'.</p>
|
|
|
+<div style="position: relative; top: -50px;">
|
|
|
+<div class="x" id="absolute">
|
|
|
+Element Information
|
|
|
+</div>
|
|
|
+</div>
|
|
|
+<div class="absolute" id="absolute">
|
|
|
+ <div class="close">X</div>
|
|
|
+ <div class="button">U</div>
|
|
|
+ <div class="button">D</div>
|
|
|
+ <div class="button">*</div>
|
|
|
+ <div class="title">Element Information</div>
|
|
|
+</div>
|
|
|
+</body>
|
|
|
+</rml>
|