Skip to content

Instantly share code, notes, and snippets.

@michsch
Created February 28, 2012 20:10
Show Gist options
  • Save michsch/1934818 to your computer and use it in GitHub Desktop.
Save michsch/1934818 to your computer and use it in GitHub Desktop.
Round corners in Chrome and Safari
/**
* Round corners in Chrome and Safari
*/
/* just layout */
html { font-size: 100.00%; }
html, body { min-height:100%; }
body {
background: #ccc;
font-size: 87.5%;
}
.ym-wrapper {
min-width: 700px;
max-width: 70em;
margin: 0 auto;
background: #fff;
}
.ym-wrapper .ym-wbox { padding: 20px; }
/* bordered image */
.border {
display: inline-block;
border: 5px #444 solid;
border-radius: 20px;
background: #444; /* background is needed here (same color as border) */
overflow: hidden;
/* IE7 - inline-block bugfix */
zoom: 1;
*display: inline;
}
.border img {
display: block;
}
<!-- content to be placed inside <body>…</body> -->
<div class="ym-wrapper">
<div class="ym-wbox">
<div class="border">
<img src="http://farm5.staticflickr.com/4091/4948872706_5b925e5e20_m.jpg" title="" alt="" />
</div>
</div>
</div>
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment