DD,
there are easier ways to achieve what you are trying to do, but you are fighting AGAINST HTML/CSS rather than with it. I mentioned this earlier.... just something to keep in mind.
However, sticking with your MO....
The error is mathematical rather than rounding. Think of what you learned from the BOX MODEL now add to that that a circumference = 2 * 3.1415... * radius. Consequently since you have already applied a radius to the parent element ( and because of the box model) , any element's actual CALCULATED size will fail to take into account the border radius/ border width/ padding (ALL must be used in the calcs) of the parent element.
in short, your child element's rounded corners are NOT being calculated an a value EQUAL to the parent element, but the parent- (the parent radius+ parent padding). I offset the child's border-radius value and than d this usually fixes things. 
for example:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
div {width:255px; border:2px solid pink; -moz-border-radius:10px;-webkit-border-radius:10px;}
h2 {text-align: center; color:#fff; background: #000; margin: 0; -webkit-border-radius:8px 8px 0 0 ;-moz-border-radius:8px 8px 0 0 }
</style>
</head>
<body>
<div>
<h2>Ed, Edd and Eddie</h2>
<p> text here</p>
</div>
</body>
</html>
That's one way.
If you want to avoid math like the plague
. you could do this:
Code:
div {width:255px; border:2px solid pink; -moz-border-radius:10px; -webkit-border-radius:10px;}
h2 {text-align: center; color:#fff; background: #000; margin: 0; border: 2px solid pink;border-bottom: none; width:100%; margin-left: -2px; margin-top: -2px;-webkit-border-radius:10px 10px 0 0 ;-moz-border-radius:10px 10px 0 0 ; }
Essentially forcing the child element (h2) to be 100% width; adding the same border width and color as the parent element ,then using negative margin to move it leftward into place. This method, WILL HAVE ISSUES if your child element (h2) has any horizontal padding applied ( see math reasoning above).
I do hope this helps. 
PS
I am a Mac person too!!! woot!
Bookmarks