Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That's actually by design - borders are joined diagonally at the corners, so what you're seeing is the edges of the right border tapering to meet the other 1px edges.</p> <p>The best solution I can think of is using a wrapper div, applying the 1px border to that, and then keeping the red border in the inner div:</p> <p>HTML:</p> <pre><code>&lt;div id="wrapper"&gt; &lt;div id="whatsnew"&gt; &lt;div id="whatsnewtitle"&gt;What's new?&lt;/div&gt; &lt;div id="whatsnewcon"&gt; &lt;b&gt;Do you know?&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; Royal Dutch Shell plc filed its Annual Report on Form 20-F for the year ended December 31, 2012 with the U.S. Securities and Exchange Commission. &lt;br /&gt; &lt;br /&gt; &lt;div style="text-align: right;"&gt; &lt;a href=""&gt;&lt;b&gt;Find out more...&lt;/b&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>#wrapper { border: 1px solid #D9D9D9; margin-top: 50px; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; font-family: Verdana; } #whatsnew { border-right: 50px solid #d52b1e; padding: 35px; padding-top: 20px; padding-bottom: 15px; } </code></pre> <p><a href="http://jsfiddle.net/JhfS8/1/" rel="nofollow">http://jsfiddle.net/JhfS8/1/</a></p> <p>(Quick and dirty hack...)</p> <p>If you wanted to avoid the grey border to the right of the wrapper, you can change that to red too:</p> <pre><code> border-right-color: #d52b1e; </code></pre> <p>... and if you wanted to be <strong>really</strong> clever, you could use <code>position: relative</code> and negative margins to 'pull' the inner div back out over the border, so the grey disappears behind the red:</p> <p><a href="http://jsfiddle.net/JhfS8/2/" rel="nofollow">http://jsfiddle.net/JhfS8/2/</a></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.
 

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