Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use <code>display: table;</code> and <code>display: table-cell;</code> and some markup changes to achieve the results you are going for.</p> <p>I removed your <code>#content</code> as it's a redundant identifier. You can use ancestor selections from the <code>#ribbon</code> to achieve the same results, without hogging a unique ID.</p> <p><strong>HTML:</strong></p> <pre><code>&lt;div id="ribbon"&gt; &lt;div&gt; &lt;span&gt;Call us today! 555-555-5555&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>#ribbon { display: table; margin: 0; margin-top: 5%; position:relative; color: #ffffff; font: 20px 'Arial', sans-serif; text-align: center; width: 100% } #ribbon:before, #ribbon:after { content: ""; width:25%; top:-.5em; position:absolute; display: table-cell; border: .9em solid #1eb2df; z-index:-2; } #ribbon:before { left:-1.5em; } #ribbon:after { right:-1.5em; } #ribbon &gt; div { margin: 0; display: table-cell; position: relative; width: 53%; } #ribbon span { display: block; color: #ffffff; font: 20px 'Arial', sans-serif; text-align: center; background: #5f85b4; padding: .5em 2em; position: relative; } #ribbon span:before, #ribbon span:after { content:""; bottom:2.1em; position:absolute; display: block; border-style:solid; border-color: #2c4059 transparent transparent transparent; z-index:-1; top: -10px; } #ribbon span:before { left: 0; border-width: .5em 1em 0 0; } #ribbon span:after { right: 0; border-width: .5em 0 0 1em; } </code></pre> <p>Example: <a href="http://jsfiddle.net/vPJ8g/4/" rel="nofollow">http://jsfiddle.net/vPJ8g/4/</a></p>
    singulars
    1. This table or related slice is empty.
    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. 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