Return to Snippet

Revision: 13436
at April 23, 2009 17:07 by johnloy

Initial Code

Based on Stu Nicols demo at

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;

Initial URL

Initial Description

Initial Title
Way to specify the width of an element as percentage pixels

Initial Tags
css, textmate

Initial Language