473,396 Members | 1,738 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,396 software developers and data experts.

Simple Rounded Corners on Div

Searching the web, there seems to be a myriad of ways to achieve
rounded corners on a fixed-width div. I'm looking for suggestions on
the simplest, most straight-forward method of achieving this.

Thanks.

-Ray

Oct 19 '07 #1
8 2149
In article
<11*********************@i38g2000prf.googlegroups. com>,
rf**@scoe.net wrote:
Searching the web, there seems to be a myriad of ways to achieve
rounded corners on a fixed-width div. I'm looking for suggestions on
the simplest, most straight-forward method of achieving this.
You are likely to profit by reading:

http://www.sitepoint.com/article/bre...out-of-the-box

--
dorayme
Oct 19 '07 #2
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article
<11*********************@i38g2000prf.googlegroups. com>,
rf**@scoe.net wrote:
Searching the web, there seems to be a myriad of ways to achieve
rounded corners on a fixed-width div. I'm looking for suggestions on
the simplest, most straight-forward method of achieving this.
Perhaps more directly... you might care to adapt

http://www.neuroticweb.com/recursos/css-rounded-box/

to your purposes.

--
dorayme
Oct 19 '07 #3
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article
<11*********************@i38g2000prf.googlegroups. com>,
rf**@scoe.net wrote:
Searching the web, there seems to be a myriad of ways to achieve
rounded corners on a fixed-width div. I'm looking for suggestions on
the simplest, most straight-forward method of achieving this.

You are likely to profit by reading:

http://www.sitepoint.com/article/bre...out-of-the-box
Sorry about this... forget it. I was looking at it but the more
I see the more it worries me the fixation on pixels...

And about the url to that rounded corner generator, now that I
have time to look closer, you are likely to need to be a bit
handy with image manip programs... that generator at:

http://www.neuroticweb.com/recursos/css-rounded-box/

is actually rather wooden and does not always function correctly.
It does not always change the backgound colour for the little
images reliably!). But it is not a hard thing to get the gifs
right. Now, if you do not want the divs to be too rigid and you
anticipate big variations in size on different users machines,
you may have to em size all the relevant gifs for them to grow
and shrink right. There is no way out but to experiment. But lett
me not say this without doing it myself:
How about this adaptation:

<http://netweaver.com.au/test/roundCnr/roundCnrExperiment.html>

Seems to grow and adapt pretty well?

--
dorayme
Oct 19 '07 #4
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
you may have to em size all the relevant gifs
no... again, sorry, these are bg images, but I emmed other
things. I think I need antibiotics, I am crook... Fancy having to
go to the bloody doc and chemist instead of the beach on a day
like this in Sydney.
for them to grow
and shrink right. There is no way out but to experiment. But let
me not say this without doing it myself:
How about this adaptation:

<http://netweaver.com.au/test/roundCnr/roundCnrExperiment.html>

Seems to grow and adapt pretty well?
--
dorayme
Oct 19 '07 #5
Dorayme, sounds like you're havin' the same kind of Friday I am! :P

Thanks for the links. I checked 'em out and was impressed by the
generator, but realized that perhaps my rounded boxes aren't as
straight-forward as I thought. My layout calls for a lightly shaded
box with a darker stroke around the edge -- something the generator
can't pull off. I'm not even sure it can be pulled off. But I
appreciate your input.

-Ray

Oct 19 '07 #6
On 2007-10-19, dorayme <do************@optusnet.com.auwrote:
[...]
><http://netweaver.com.au/test/roundCnr/roundCnrExperiment.html>
This looks doesn't look so good in Firefox.

The problem seems to be that you're setting "font-size: 1px; height:
1em" on the divs that contain the curved bits.

If the font-size is 1px then 1em should be about 1px, so Firefox looks
right to me. But Konqueror and Opera both make those boxes much higher.
Oct 20 '07 #7
On 10/18/07 05:58 pm, rf**@scoe.net wrote:
Searching the web, there seems to be a myriad of ways to achieve
rounded corners on a fixed-width div. I'm looking for suggestions on
the simplest, most straight-forward method of achieving this.
None of those myriad appealed to you?
<http://www.html.it/articoli/nifty/index.html>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Oct 20 '07 #8
In article <sl*********************@bowser.marioworld>,
Ben C <sp******@spam.eggswrote:
On 2007-10-19, dorayme <do************@optusnet.com.auwrote:
[...]
<http://netweaver.com.au/test/roundCnr/roundCnrExperiment.html>

This looks doesn't look so good in Firefox.

The problem seems to be that you're setting "font-size: 1px; height:
1em" on the divs that contain the curved bits.

If the font-size is 1px then 1em should be about 1px, so Firefox looks
right to me. But Konqueror and Opera both make those boxes much higher.
Thanks Ben. I was trying to serve up something to help OP and
changed a few things I thought needed more fluid treatment... I
looked in Opera and Camino, you are right, it was bad! Hope it it
better now, I just put the font-size concerned into em without
thinking further about it, it seems to work now.

--
dorayme
Oct 21 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: meltedown | last post by:
I noticed that the footer menu on the bottom with rounded corners only uses one image of a rounded corner:img/round15_bot.gif This one image seems to be used for all four corners, but that can't...
1
by: jimfortune | last post by:
The following Access VBA function creates a string that can be used in a pdf stream to draw or fill a rectangle of a given color with rounded corners: 'Begin code----------- Public Function...
2
by: Dino Buljubasic | last post by:
Hi, I have several panels that holds bunch of controls with information on my forms. My form has background image property set to an image that has borders defining where my panel comes and...
8
by: TheCornjerker | last post by:
I've been looking into what method I should use to show rounded corners (and I've found a lot). My question is why does Google seems to mostly use the table method with an image in each corner. ...
6
by: Schraalhans Keukenmeester | last post by:
I want to achieve the following: A small image in each of the corners of a box, like below: +-------------------------------+ | + | + | + | + | + | +
5
by: Cindy Lee | last post by:
Is there anyway to put rounded corners on the grid views? When I bring it up in the brower I need to have rounded corners. There are some tricks I can do to regular html tables, but is there any...
1
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could...
4
by: PWS | last post by:
I am despertely trying get a DIV to look like a box with rounded corners. I can find load of examples this where the first line of text has the top graphic and the last line of text has the...
6
by: moondaddy | last post by:
I need to be able to make polygons with rounded corners. This will be to draw group outlines around shapes in a diagramming tool in wpf. all angles in the polygon will be 90 degrees, but somehow...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.