Rounded Borders without any image - pure css

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Zappu

Rounded Borders without any image - pure css

Post 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;}
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Rounded Borders without any image - pure css

Post 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
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Locked

Return to “Layout and Design (CSS & HTML)”