Current location: Hot Scripts Forums » General Web Coding » CSS » [SOLVED] Best Way to apply rounded corners?


[SOLVED] Best Way to apply rounded corners?

Reply
  #1 (permalink)  
Old 07-16-08, 10:26 AM
outhowz42 outhowz42 is offline
Newbie Coder
 
Join Date: Jun 2008
Location: USA
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Best Way to apply rounded corners?

I would like to apply rounded corners to all of my boxes... have a look at the www.cnn.com website. All of their white boxes have nice rounded corners. What is the best and most efficient way of doing this?
Reply With Quote
  #2 (permalink)  
Old 07-16-08, 10:49 AM
hansk's Avatar
hansk hansk is offline
Newbie Coder
 
Join Date: Jul 2008
Location: Czech republic
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rounded corners

There are tons of ways how to apply rounded corners, I don't know which one is the best, I usually use a method with the images of corners, because of good browser compatibility. Try searching and you'll find a lot of methods and you can choose the one that suits the best for your project.
Reply With Quote
  #3 (permalink)  
Old 07-16-08, 11:55 AM
scotnut scotnut is offline
Newbie Coder
 
Join Date: Jul 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
A couple of the websites I manage have been designed with those rather modern and stylish rounded corners.

How I've done it is create the images of each of the 4 corners, then specify in the CSS the position of the corners. On the page itself, in the img tag, link the id in the CSS to the image.

See below for snippets from my CSS and HTML:

CSS
Code:
#tl {

position: absolute;
	top: 0px;
	left: 0px;

}
(and then repeated for top right, bottom right, bottom left)
HTML
Code:
<div id="head" align="center">
<img src="css/top_lt.png" alt="Curve" width="12" height="12" id="tl"/><img src="css/top_rt.png" alt="Curve" width="12" height="12" id="tr"/><img src="css/bot_lt.png" alt="Curve" id="bl"/><img src="css/bot_rt.png" alt="Curve" id="br"/>
  <h1 align="center">Title</h1>
Hope this helps
Reply With Quote
  #4 (permalink)  
Old 07-28-08, 10:42 AM
outhowz42 outhowz42 is offline
Newbie Coder
 
Join Date: Jun 2008
Location: USA
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rounded corners without images

I would prefer to do this without using images. Any suggestions?
Reply With Quote
  #5 (permalink)  
Old 07-28-08, 11:06 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
You can use CSS:
http://www.spiffycorners.com/

Or JavaScript:
http://www.curvycorners.net/

(I prefer the JavaScript method.)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Rounded Corners chambaz CSS 2 03-09-08 05:19 AM
flexible rounded corners for this design lindasnephew CSS 4 03-05-08 08:44 AM
Rounded corners with photoshop zoliky The Lounge 4 11-25-07 04:09 AM
Moderators make $300 weekly. Apply Now forum.downloadline.com Job Offers & Assistance 4 10-03-04 09:20 AM
Moderators get $300 weekly. Apply Now forum.downloadline.com General Advertisements 0 08-24-04 02:52 PM


All times are GMT -5. The time now is 02:11 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.