How to add rounded corners to a button or div tag in HTML & CSS

This lesson is exclusive to members

Course contents
SECTION: 4
Project 2: Bike Repair Website 6:12:48
SECTION: 6
Project 4: Bootstrap Yogurt Website 3:35:39

Questions

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Course info

128 lessons / 17 hours 5 projects Certificate of achievement

Overview

Hi there, my name is Daniel Scott and together we’re going to learn how to build professional responsive websites. which look good on mobiles, tablets and desktop screens.

We will build 4 sites together...
  • a simple but elegant restaurant website.
  • a bike repair website. 
  • a responsive portfolio website.
  • a Bootstrap website.  

We cover everything you need to build your first website. From creating your first page through to uploading your website to the internet. We’ll use the world’s most popular (and free) web design tool called Visual Studio Code.

There are exercise files you can download and then work along with me. At the end of each video I have a downloadable version of where we are in the process so that you can compare your project with mine. This will enable you to see easily where you might have a problem.

We will delve into all the good stuff such as how to create your very own mobile burger menu from scratch learning some basic JavaScript and jQuery. 

 You will...
  • Learn how to work with responsive images and icons. and stunning full screen background images and probably one too many gradients. 
  • Learn how to create forms and to choose great fonts for your website. 
  • Learn how to work with Bootstrap 4 to easily add carousels, cards and complex looking menus. 
  • Setup a domain name with hosting so that your website is live on the internet for others to see.  

There are fun class projects for you to work on which will enable you to practice what you learn. By the end of this course you’ll have a great understanding of important web design topics like HTML5, CSS3, Flex box, Responsive design and Bootstrap.   

If that all sounds a little too fancy - don’t worry, this course is aimed at people new to web design and who have never coded before. We’ll start right at the beginning and work our way through step by step. 

Who am I? 

I’m Dan, and I’ve been building websites for about 15 years now. I am award winning instructor, and have won a MAX Master award for the last 2 years in a row at the prestigious Adobe Max conference.

Time to upgrade yourself?
Sign up for the course and let’s learn how to build responsive websites.

Course duration 16 hours 42 mins
Daniel Scott

Daniel Scott

Founder of Bring Your Own Laptop & Chief Instructor

instructor

I discovered the world of design as an art student when I stumbled upon a lab full of green & blue iMac G3’s. My initial curiosity around using the computer to create ‘art’ developed into a full-blown passion, eventually leading me to become a digital designer and founder of Bring Your Own Laptop.

Sharing and teaching are a huge part of who I am. As a certified Adobe instructor, I've had the honor of winning multiple Adobe teaching awards at their annual MAX conference. I see Bring Your Own Laptop as the supportive community I wished for when I was first starting out and intimidated by design. Through teaching, I hope to bring others along for the ride and empower my students to bring their stories, labors of love, and art into the world.
True to my Kiwi roots, I've lived in many places, and currently, I reside in Ireland with my wife and kids.

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

Downloads & Exercise files

Download Exercise Files Download Completed Files

Transcript

Hi everyone, this video is going to be all about radiuses around the corners of buttons, but we'll do it to images and we'll do it to Div tags as well. We'll do big ugly radiuses, like this, and nice simple ones like this. Ooh, nice and small, plus we'll do random ones like this, or this, or this. You get the idea, rounded corners. This video is like four minutes long, but really, just add border radius to your buttons, and you'll be done, but if you want the full load down, let's watch to the end. 

To add little rounded corners to the edges of our button, or Div tags, or any sort of box, it's super easy. In VS code we're going to find my button. I'm going to say, you have a border radius of whatever you want. I'm going to use pixels, and I'm going to say, I want it to be 2 pixels, and that will do all four corners. So let's have a little look, and look, got little rounded corners. Let's make them a bit more obvious just so you can see. 12, giant rounded corners. So you can do individual corners. I'll show you a couple of things to do with border radius while we're here. 

First of all it doesn't matter what you apply it to, as long as it's a box and it's got edges. Let's have a look at-- what have we got? These cards, Cards 1, 2, and 3, they will work, Cards 1, 2, and 3. You, paste. So Card1, rounded corners, this image, a little bit weirder. It's in a box, but it is, like if I do it to Hero Box2, which is the box he sits in, where is Hero Box2? If I do it to this, it's not going to work. The box is, but then there's this image inside of the box. So what we need to do is say, if there's an image, if it's inside of Hero Box2, then-- so you actually apply it to the image. 

The only reason I'm making it a Compound Class is, just because I don't want to do it to all images on the document. You might like that. Image, inside of Hero Box2. Did it to all images. Hero Box2, is he? In Hero Box2, am I just making up names to stuff? Oh yeah, it's going to work, Hero2. Let's go to Hero Box2. Here we go. So that is it, could be anything. You get the idea, right? 

The other thing you can do with border radius, is we've just done it for all four corners, like we did with Padding, you can use either 1, which does them all, 2, which does top and bottom, left and right. So I could do 12, and let's say, 3, or 0, let's do 0, for the top and bottom. So you've got the first one, you get what I mean. Hard to explain. Top left is the first, then this one gets skipped. So you get it. I'm like, explaining, that's what that does. And if you want to do 4, it's going to go, start on the top left, go around, and the next one's going to be 3, or 6, then the next one's going to be 100. It's going to go through all of these. 

Now what ends up happening for 100, is that's not actually 100 pixels. It goes as far as it can. So that's as far as it can. It could be 1,000, it wouldn't matter. So you can use that to your advantage, I can just make them all 1000 pixels, and it gives you that kind of pill shaped box, because it just tries to fit it out until it goes into a circle, and then it can't go any further. 

You can do kind of neat tricks with it, you might go 0 pixels, 1000, and, 1000, and then 0. It's all right, here you go. You can do interesting little shapes with it. You get the idea. I'm going to put in two pixels, because I just want this, like real subtle little edge on it. And that is Border Radius, my friends, nice and easy, but I stretched it out for a few minutes. Let's get on to the next video.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024