/ Published in: Other

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Based on Stu Nicols demo at http://www.cssplay.co.uk/boxes/outside.html Set the percentage width on the out element and the extra pixels-based width extension on the inner using negative margins */ .outside { position: relative; width: 25%; background: #9caf9c; color: #fff; margin: 1em auto; } .inside { display: block; position: relative; color: #000; margin: 0 -50px; background: #c4c4c4; color: #000; }
Comments
