If you're aiming to achieve a semicircle, you can make use of the scaling requirement outlined in the specification. The trick lies in employing the border-radius
property with significantly large and equal values (refer to this fiddle http://jsfiddle.net/gLsd2z4L/ based on your initial code):
div.rounded-side {
background-color:yellow;
padding:10px;
border-radius: 0 100em 100em 0;
}
div.rounded-side > p {font-size: 24px;}
<div class="rounded-side">
<p>This div is by default rectangular in shape.
I'd like the right side of it to be rounded, if that's possible. </p>
</div>
The reason behind this methodology, as explained in the specification, is:
Corner curves must not overlap: When the sum of any two adjacent border radii exceeds the size of the border box, UAs must proportionally reduce the used values of all border radii until none of them overlap.
In this situation, the combined radii measure up to 200em; assuming that the height (or width) of your element is less than this total, the radii will be scaled down uniformly. By selecting identical values for the radii and opting for very large figures (beyond the reach of the element's dimensions), the browser is prompted to carry out the necessary scaling.
In reference to the link shared by Stephen P in a comment on another response titled "The curious case of border-radius:50%", they recommend using 9999px
; my preference for 100em
is purely aesthetic. Unless specific units/values impact performance (which is highly unlikely), the choice between options doesn't matter much, as long as the radii are uniform and collectively exceed the element's size.