Menu
Coddy logo textTech

Border and Radius

Lesson 5 of 8 in Coddy's CSS Project - Fancy Button course.

button element in HTML comes with a default border, let's customize it!

To make rounded border use border-radius property (use the same values as in padding or margin), for example,

#rounded {
	border-radius: 8px;
}

To remove the border entirely you can override using,

#no-border {
	border: none;
}

Tip: if you set the border-radius to big value it will get a circle shape!

challenge icon

Challenge

Easy

Tasks:

  1. Change the border radius to greater than 0
  2. Change the border to something different than the default

Try it yourself

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
</head>
    <body>
        <!-- Write HTML code here -->
    </body>
</html>

All lessons in CSS Project - Fancy Button

2The CSS Project

SizesProject lessonColorsProject lessonBorder and RadiusProject lessonShadowsProject lessonHover effectProject lessonFinal stylingProject lesson