Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can achieve this with a bit less markup by using the "sliding doors" technique. Basically, you just make sure that the images for each corner are large enough that they will still overlap a little when the box is at the maximum size you ever expect it to be. See this example for a box with images on all four sides: </p> <pre><code>&lt;style&gt; div.box { float: left; } div.tl { background: transparent url('topleft.gif') no-repeat top left; padding-top: 8px; padding-left: 8px; } div.bl { background: transparent url('bottomleft.gif') no-repeat bottom left; height: 8px; padding-left: 8px; } div.tr { background: transparent url('topright.gif') no-repeat top right; padding-right: 8px; } div.br { background: transparent url('bottomright.gif') no-repeat bottom right; padding-right: 8px; } &lt;/style&gt; &lt;div class="box"&gt; &lt;div class="tr"&gt; &lt;div class="tl"&gt; Lorem ipsum dolor sit amet... &lt;/div&gt; &lt;/div&gt; &lt;div class="br"&gt; &lt;div class="bl"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>For a box with images on only three sides the code would be even simpler as you'd only need two divs to attach your images to: </p> <pre><code>&lt;style&gt; div.box { float: left; } div.bl { background: transparent url('bottomleft.gif') no-repeat bottom left; padding-left: 8px; } div.br { background: transparent url('bottomright.gif') no-repeat bottom right; padding-right: 8px; } &lt;/style&gt; &lt;div class="box"&gt; &lt;div class="br"&gt; &lt;div class="bl"&gt; Lorem ipsum dolor sit amet... &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>These examples will give you a stretchy box that can grow as much as you want provided that the size of the images containing the corners and borders is sufficient. Note also that the "padding" set on the containing divs should be no less than the width/corner radius of your images, though it can certainly be greater should you wish. Happy coding! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload