October 2016
Beginner to intermediate
709 pages
16h 52m
English
Curved corners were at one time the Holy Grail of the web design world. It was always possible, but never simple. A designer had a limited number of bad choices to employ to make an element have a curved corner.
This is now achieved without too much fuss with CSS3. The border-radius property is a simple method of creating a rounded corner on an element.
First create your HTML element. This works on any element that can have a border. So let's make a paragraph block of text. You can get filler text at http://lipsum.com.
<p class="rounded"> Lorem ipsum dolor sit amet…</p>
Next add CSS to fill out the paragraph element:
.rounded{ background-color:#ccc; width:200px; margin:20px; padding:20px; ...Read now
Unlock full access