Page 1 of 1

Rounded Borders without any image - pure css

Posted: Sat May 20, 2006 1:55 pm
by Zappu
Just in the case somebody is interesting in this as well. Even it has a slightly error with mozilla, but maybe somebody can fix it :)

Code: Select all

<!-- The HTML Code --->
<div id="xsnazzy" style="width: 540px; float: left;"><b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b><div class="xboxcontent">
		<h2>{title}</h2>
		<p>{content}</p>
</div><b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b></div>
and

Code: Select all

<!-- The css Code --->
#xsnazzy h1, #xsnazzy h2, #xsnazzy p {margin:0 10px; letter-spacing:1px;}
#xsnazzy h1 {font-size:2.5em; color: #2f4f4f;}
#xsnazzy h2 {font-size:14px; color:#696969; border:0;}
#xsnazzy p {padding-bottom:0.5em; padding-right:0.5em;}
#xsnazzy li {padding-bottom:0.5em; padding-right:0.5em;}
#xsnazzy h2 {padding-top:0.5em;}
#xsnazzy {background: transparent; margin:1em; text-align: justify; }

.xtop, .xbottom {display:block; background:transparent; font-size:1px;}
.xb1, .xb2, .xb3, .xb4 {display:block; overflow:hidden;}
.xb1, .xb2, .xb3 {height:1px;}
.xb2, .xb3, .xb4 {background:#f5f5f5; border-left:1px solid #dcdcdc; border-right:1px solid #dcdcdc;}
.xb1 {margin:0 5px; background:#dcdcdc;}
.xb2 {margin:0 3px; border-width:0 2px;}
.xb3 {margin:0 2px;}
.xb4 {height:2px; margin:0 1px;}

.xboxcontent {display:block; background:#f5f5f5; border:0 solid #dcdcdc; border-width:0 1px;}

Re: Rounded Borders without any image - pure css

Posted: Sat May 20, 2006 4:52 pm
by kermit
nifty corners cube might be of interest..

rounded corners using css and a little scripting; no images. degrades to square corners when scripting is disabled in the browser. markup stays free of extra clutter.

http://www.html.it/articoli/niftycube/index.html