Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 04-05-2009, 10:29 PM Rounded edges
konetch's Avatar
Ultra Talker

Posts: 258
Trades: 0
I was wondering if there was an easier method for creating rounded edges than the one I'm using right now?

This is what I have:
Code:
------------------HTML-----------------
<div class="sidebox">
	<div class="boxhead"><h2>Test Headline</h2></div>
	<div class="boxbody">
		<p>This is a short sample paragraph.</p>
		<p>And another one.</p>
	</div>
</div>
------------------CSS-----------------
.sidebox {
	margin: 0 auto; /* center for now */
	width: 17em; /* ems so it will grow */
	background: url(sbbody-r.gif) no-repeat bottom right;
	font-size: 100%;
}
.boxhead {
	background: url(sbhead-r.gif) no-repeat top right;
	margin: 0;
	padding: 0;
	text-align: center;
}
.boxhead h2 {
	background: url(sbhead-l.gif) no-repeat top left;
	margin: 0;
	padding: 22px 30px 5px;
	color: white; 
	font-weight: bold; 
	font-size: 1.2em; 
	line-height: 1em;
	text-shadow: rgba(0,0,0,.4) 0px 2px 5px; /* Safari-only, but cool */
}
.boxbody {
	background: url(sbbody-l.gif) no-repeat bottom left;
	margin: 0;
	padding: 5px 30px 31px;
}
Alex Konetchy
http://www.konetchreport.com
konetch is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-06-2009, 03:51 PM Re: Rounded edges
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Sure. I don't really like the method you're using right now, seeing that you're using rather large images and there is a max-height. Here's something similar to what I've used before:
Code:
.container {width: 300px;}
.top {height: 10px;}
.main {}
.bottom {height: 10px;}

.right {float: right;}
.left {float: left;}
HTML Code:
<div class="container">
<div class="top"><img src="topleft.gif" class="left" /><img src="topright.gif" class="right" /></div>
<div class="main">
Main content here
</div>
<div class="bottom"><img src="bottomleft.gif" class="left" /><img src="bottomright.gif" class="right" /></div>
</div>
Of course, it's extremely simple and very easy to modify.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 04-06-2009, 06:40 PM Re: Rounded edges
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I guess I cheat - I don't bother trying to place 4 corners, I just slice off the rounded top and rounded bottom of the boxes and put them in as backgrounds on the center div.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Rounded edges
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11815 seconds with 12 queries