473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to round the corners of a box using CSS?

123 100+
The css below will create a rectangle fill it with
these color #F6F6F6 but i want to curve the edge of
the rectangle.

Expand|Select|Wrap|Line Numbers
  1. .bold {
  2. border: solid 1px #e7e7e7; 
  3. background-color: #F6F6F6;}
  4.  
Feb 2 '11 #1
5 2047
Samishii23
246 100+
https://developer.mozilla.org/en/css/-moz-border-radius
Look towards the bottom, "Browser Compatibility"
Feb 5 '11 #2
It's not supported in every browser on the planet, but quite a lot of browsers does support it. Use this code:

Expand|Select|Wrap|Line Numbers
  1. #your_box {
  2. border: 1px solid black; /*the box NEEDS to have a border for this to work. The border color can be the same as the background-color.*/
  3. -moz-border-radius: 30px;
  4. -webkit-border-radius: 30px;
  5. border-radius: 30px;
  6. }
  7.  
AFAIK this is supported in Firefox, Safari, Google Chrome and Opera. Don't know about the other browsers.
Feb 17 '11 #3
drhowarddrfine
7,435 Expert 4TB
The only "other browser" that doesn't support this is IE, the world's worst browser. But that's to be expected.
Feb 17 '11 #4
@drhowarddrfine:
There are more browsers out there than Safari, Google Chrome, Firefox, Opera and Internet Explorer. Also, as of IE9, IE supports border-radius. (Source: http://stackoverflow.com/questions/6...r-radius-in-ie).
Feb 17 '11 #5
drhowarddrfine
7,435 Expert 4TB
Yes, but 98% of all browsers used are one of those.

IE9 isn't out yet and is a poor choice for anyone since it will be the worst in supporting modern standards and practices in most areas.
Feb 17 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Vinodh Kumar | last post by:
Number One: ========= I know its a 100% offline post.But seeing the diversity of the domain from which people are participating, I would like to post this question here.Pardon me.At the least, u...
15
by: Steven T. Hatton | last post by:
The following may strike many of you as just plain silly, but it represents the kind of delelima I find myself in when trying to make a design decision. This really is a toy project written for...
1
by: tshad | last post by:
I am using a slidemenu program that I download and seem to have a problem with IE when sliding down. I have 2 containers (div) on top of each other and the menu slides out from behind the other....
1
by: Rudolf Ball | last post by:
Hi NG, anybody has any C# code for a rectangle with round edges? Thank you very much Rudi
4
by: AsuWoo | last post by:
you are given two rectangles, each defined by an upper left(UL) corner and a low right(LR)corner,Both rectangles' edges will always be parrallel to the x or y axis ,Write a window program with c#...
3
by: | last post by:
I am having a hard time understanding the logic behind the Rectangle object. My problem has to do with the way the rectangle treats the "Width" property. For example, take the following rectangle...
2
by: Adam Maltby | last post by:
Hi does anyone know how to fill a rectangle with an ellipse style fill (ie so it gives a spotlight effect on a rectange?) I know how to create rectangles, ellipses etc and I can fill the rect...
4
by: iwdu15 | last post by:
Hi, i have a game im programming where a i need a timer to be disabled if a buttons top edge hits the bottom edge of a label but nothing i try seems to work. Also i need it to stop the timer if it...
7
by: Mark Ingram | last post by:
Hi, how can i draw a rounded rectange, with a border within a specified area? i.e. if i have a Rectangle with width and height of 100, how can i draw a rectange with 2 pixel border inside of the...
1
by: serge calderara | last post by:
Dear all Any idea to how to make a panel with rounded corner ? regards serge
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.