Grow your business, income, & life

20+ yrs of experience to offer you education and business services that launch and grow your business

CSS3 Tutorial for Beginners: 43 Creating Custom CSS Pill Buttons

This is Sasha and welcome to another CSS training video where I share with you how to edit and modify your website within the CSS. If you have an online business, this is fantastic and great for you to get started or if you’re looking to brush up on some CSS code, then this is the training video to watch.

In either case, today, what we’re going to do is take a look at how to create some nice CSS buttons, and I’ll show you some different ways to play around with those. Let’s take a quick look.

The button that we’re looking to create is going to look somewhat similar to this. If you can see, we have like a nice primary roll over and when you push it down, it kind of goes down by 1 pixel or 2. Anyways, that’s kind of what we’re going to look for or somewhat similar to a button.

I’m going to show you how to do this and in either case the code on the HTML merely is just A, and then we put a class famous button, href, we pointed it to somewhere so you could go to, you know, your website.com or Google and then your text and closing of that anchor tag.

Either case, let’s start from scratch, and I’m going to show you how to build this. First off, when you have the great button, you need a class, we’re going to call it famous button right there, and as you can see that now that I started working on it right away, that button is gone.

In either case, we have a famous button right there and what I’m going to do is when you have this great button, let’s start with coding some basic things. I’m going to make this one maybe like a blue button. We’ll make it kind of like yellow and blue. Let’s do yellow so you can see as a yellow version.

We’ll go ahead, and I’ll do something like this, we’ll start with – I always like to do kind of like a background color first so we can kind of start right there. We can say text decoration none, okay? The other thing is the font family. We can do Arial, okay? That gives us a nice font.

We can do the font size. Let’s make it about 40 pixels just so that it’s nice and big. We’ll also make the color probably something a little bit darker than – a yellow tone but a darker yellow tone, okay? We’ll do – we’ll put something like this. I could do something a little more, let’s say, brownish as well because yellow and brown, they work well.

You can see right now how it’s working out pretty well. The other thing I want to do is, let’s say, font weight, I’ll do maybe 600, we’ll see how that looks. Font, I’ll go ahead and use Gotham just because I know that in that font family there’s a lot of different sizes when it comes to buttons because I could do – font weight I mean. I could do like a 300, I would like a 600, so there’s a lot of font weights.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------

.famousbtn {
	background: #ffe875;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 40px;
	color: #6d5731;
}


Okay, so far we’re progressing pretty good. I need to add some padding because it’s just too close to the edges so padding, let’s just say, I’ll do maybe 25 around just to get me started and, let’s just say margin-top 25 as well just so I can see that button going and let me just take a look here.

If I just add that actually to the body, let’s do margin 50 pixels, that way we have a little bit of room to work with. That way I don’t need that margin right there. Anyway, I have padding 25, let’s do border-radius, let’s go about – let’s start with 45 pixels and see here how that looks.

Okay, it looks pretty good, I probably actually want do 65. You can see it rounds it a little bit better maybe even, let’s do, 85 so we have kind of like that pill button. With the padding, the 25 is good. What I probably want to do is just 20 pixels on top and bottom and more like 60 pixels on left and right and let’s reduce that font size a little bit, so it fits on there.

There we go, that creating a nice button right there. I might even go ahead and add like a 1 pixel or 2-pixel border, and I’m going to use since our background is this color, okay? Let me see if I can pull that color. Do I want to make it just a fair bit darker, okay?

I’ll go ahead and make it this color. You could see, there we go. That’s creating like a nice border. I could even go maybe 3 pixels. There we go. You can see that’s starting to take shape.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------
body {margin: 50px;}

.famousbtn {
	background: #ffe875;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 30px;
	color: #6d5731;
	padding: 20px 60px;
	border-radius: 85px;
	border: 2px solid #e8d266;
}


Then what I want to do is go ahead and put something on them – as the rollover, okay? As we roll over, so this will be our hover state, I’ll go ahead and do this. What do I want to do? Well, let’s say I’ll change color to maybe orange, okay, so some orange color tone.

Let me zoom out of here so that way we can see all the different color. I’ll go ahead right here. We’ll change this to background right there, something to this color. Let’s see how that starting to look.

As you can see, my text is stating the same. I’ll need to change the color of that text, and we’ll go to white, okay? As I roll over, you can see how that’s starting look. It looks pretty good. I don’t need probably that border, border 0 or none, okay, and let’s take a look, see?

As we roll over, there’s no border right there. I could add one if I wanted to and, let’s say, we make it a little darker. Border, we’ll do the same size, 3 pixels solid but a different color. You can see, there we go, that’s coming along pretty well.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------
body {margin: 50px;}

.famousbtn {
	background: #ffe875;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 30px;
	color: #6d5731;
	padding: 20px 60px;
	border-radius: 85px;
	border: 2px solid #e8d266;
}

.famousbtn:hover {
	background: #ff6f1c;
	color: #fff;
	border: 3px solid #db5b11;
}

The other thing that I could do it, let’s say, on actual meaning as we press it down we can have that button move. I’ll go ahead and create this next little bit right here, and we’ll do on active and – okay, so what I want to do is probably go ahead and put this back, but I’ll do position relative.

Let me see because it’s relative to the past. Let’s see if that helps and works out. We’ll go to 2 pixels and let’s see here. All right, so there we go. That works a lot better because if I do 5, there we go. That’s working a lot better.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------
body {margin: 50px;}

.famousbtn {
	background: #ffe875;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 30px;
	color: #6d5731;
	padding: 20px 60px;
	border-radius: 85px;
	border: 2px solid #e8d266;
}

.famousbtn:hover {
	background: #ff6f1c;
	color: #fff;
	border: 3px solid #db5b11;
}

.famousbtn:active {
	position: relative;
	top: 3px;
}

We’ll go 3 pixels there on the active state as I press down, that button goes down just a little bit, okay? This is looking good. The other thing that I could do is you can see these transitions very quickly. What I could do is I could do kind of a transition, and then all, I’ll do 0.5 – let’s do 2 seconds ease.

Let’s see what that looks like. As you can see as I roll over, it makes it fades into it. If I want it a little quicker, I’ll do 1 second. Let’s see how that looks. It’s a little bit smarter. Maybe even faster would be better. Let’s do 300 milliseconds and let’s see what that looks like. There we go. That a little bit better even 600 or 700 milliseconds. There we go. That’s a nice little transition.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------
body {margin: 50px;}

.famousbtn {
	background: #ffe875;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 30px;
	color: #6d5731;
	padding: 20px 60px;
	border-radius: 85px;
	border: 2px solid #e8d266;
	transition: all 700ms ease;
}

.famousbtn:hover {
	background: #ff6f1c;
	color: #fff;
	border: 3px solid #db5b11;
}

.famousbtn:active {
	position: relative;
	top: 3px;
}

You can see how that’s working with the button. If you wanted to get a little more complicated with it, of course, you could do a little bit of a gradient with it, so that’s another option. If I wanted to get rid of the border-radius, I could go ahead and get rid of that.

You can see it’s like a nice flat button that’s a little bit more squarish. That’s another way of doing it and creating a nice CSS button and then when you press it, you get a little bit of that effect, and I could quickly change these colors if I wanted it kind of like a blue color tone right here. I could go ahead and change the background to blue. I could also change the color of the text to white, and you can see how that now is kind of like a bluer color. If I wanted it more like a purple color, I could do that as well.

--------------------- HTML CODE ------------------

		

	

Join Our Email List!




--------------------- CSS CODE ------------------
body {margin: 50px;}

.famousbtn {
	background: #6935a5;
	text-decoration: none;
	font-weight: 600;
	font-family: gotham;
	font-size: 30px;
	color: #fff;
	padding: 20px 60px;
	border-radius: 85px;
	border: 2px solid #3a3a3a;
	transition: all 700ms ease;
}

.famousbtn:hover {
	background: #ff6f1c;
	color: #fff;
	border: 3px solid #db5b11;
}

.famousbtn:active {
	position: relative;
	top: 3px;
}

That’s just playing with some colors, and then I’ll go ahead and change that border as well and let’s take a look at what that looks like so you could see very nice simple buttons, you know, that you can use in all sorts of ways. Let’s see, there we go. As you can see, there you go. That’s your CSS button with a nice rollover effect and even as you press down a little active state.

Download our online toolbox for free! Simply click the get it now button below and see the must-have tools for online business owners!

Struggling to make your blog business profitable? Want to turn your hobby blog into an income-generating blog? Learn the right way to plan a highly successful and profitable blog business.

Learn how to create Pinterest Pins that are attractive, click-worthy, and make people want to click your Pins! Great skill to have to promote your content or make side-income designing Pinterest Pins for others.

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get MyOnline Business Toolbox
 

Had enough of the expensive and useless online business tools?

 

Stop wasting your money and time and get my list of awesome business tools.

 

Just enter your email address below so we know where to send it.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Video Gear Guide for YouTubers

Are you ready to improve your YouTube channel? If you want to see the best YouTube gear for YouTubers, then download my latest gear guide!

 

Enter your email below to get started...

FREE DOWNLOAD

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Wow! Get Ready to Start your Online Business Journey!

Just enter your email address below and be one of the fast growing online businesses roght now!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Create Videos that Convert Viewers into Buyers?

Are you tired of making videos that don't produce results?

 

Get my Video Formula cheat sheet and see how to create videos that get clicks and attracts buyers!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My Youtube Video Creation Checklist for FREE...
 

Overwhelmed by number of tasks that you need to do to make high-quality YouTube videos?

 

Then grab this YouTube Video Creation Checklist if a strategic procedure list for producing your YouTube videos.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

This is a List of the 125 Most Profitable YouTube Niches that might be a real eye-opener for you.


Sign up for FREE and gain some extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Profit from My 35 Local Strategies to Make Extra Money
 

Are you interested in making some money on the side? That don't need to be extra hard.

 

You can use My 35 Local Strategies to Make Extra Money and in seriously short time reap the benefits.

 

Grab this opportunity by entering your email below...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

FREE Guide to the Best Cameras for a Youtuber

Eager to find out which cameras are the top choices to producing and recording videos?

 

Grab my FREE Guide below by entering your email address... 

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

225 Profitable Pinterest Niches

Are you interested in learning which Pinterest niches are profitable?

 

Grab our FREE Pinterest Niche Guide by entering your email below

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

How to Get Started Selling Your Own Digital Products

Get my free mini-series by entering your email address below

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Find a Profitable Niche?

If you are interested in starting an online business and want to find the perfect niche to start making tons of money.

 

Then grab our FREE email series on how to find a highly profitable niche!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Get My Quick-Start Guide to Build Your Empire?

If you are interested in starting your own online business and making money online.

 

Then grab our quick email series on how to start a profitable business fast!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Learn How to Get Thousands of

Visitors to Your Website
 

This FREE email series will show you exactly how to get thousands of real visitors to your website even if you are an absolute beginner.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

5,000 SUBSCRIBERS

Derek will teach you simple tactics to attract life-long customers through real-world examples.

FOR FREE?

Want to learn how to get

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

Get my list of the 125 Most Profitable YouTube Niches. It will be an eye-opener for you!


Sign up for FREE and get extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

Get my list of the 125 Most Profitable YouTube Niches. It will be an eye-opener for you!


Sign up for FREE and get extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

don't call us.
we will coconut
you

organic pop up market store is heading your way​