tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

flexbox-position-absolute-2-ref.xhtml (2187B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <!-- Reference case for absolutely positioned children of a flex container. -->
      7 <html xmlns="http://www.w3.org/1999/xhtml">
      8  <head>
      9    <style>
     10      div.containingBlock {
     11        top: 15px;
     12        left: 20px;
     13        height: 400px;
     14        position: absolute;
     15        border: 2px dashed purple;
     16      }
     17      .abspos {
     18        position: absolute;
     19        border: 2px dotted black;
     20      }
     21      div.flexbox {
     22        width: 200px;
     23        height: 100px;
     24      }
     25      div.a {
     26        width: 100%;
     27        height: 100px;
     28        background: lightgreen;
     29        display: inline-block;
     30      }
     31      div.b {
     32        width: 100%;
     33        height: 100px;
     34        background: yellow;
     35        display: inline-block;
     36      }
     37      div.inflex {
     38        width: 20px;
     39        height: 100px;
     40        background: gray;
     41        display: inline-block;
     42      }
     43      div.noFlexFn {
     44        width: 16px;
     45        height: 16px;
     46        background: teal;
     47        display: inline-block;
     48      }
     49    </style>
     50  </head>
     51  <body>
     52    <div class="containingBlock">
     53      <!-- First child abspos: -->
     54      <div class="flexbox"
     55           ><div class="a abspos" style="width: 30px"/><div class="b"/></div>
     56      <!-- Second child abspos: -->
     57      <div class="flexbox"
     58           ><div class="a"/><div class="b abspos"
     59                                 style="width: 20px; left: 0"/></div>
     60      <!-- Middle child abspos: -->
     61      <div class="flexbox"
     62           ><div class="a" style="width: 80px"
     63          /><div class="inflex abspos" style="left: 0"
     64          /><div class="b" style="width: 120px"/></div>
     65      <!-- Third child abspos, w/ inflexible items & justify-content: space-around: -->
     66      <div class="flexbox"
     67           ><div class="inflex" style="margin-left: 15px"
     68          /><div class="inflex" style="margin-left: 30px"
     69          /><div class="inflex" style="margin-left: 30px"
     70          /><div class="noFlexFn abspos" style="left: 90px"
     71          /><div class="inflex" style="margin-left: 30px"/></div>
     72    </div>
     73  </body>
     74 </html>