p{
border-style: solid;
border-width: 2px;
border-color: blue;
border-radius: 20px;
}
Video Summary
All right, in this section, we’re talking about CSS borders, how we can put borders around our elements.
And this really helps when we want to box off or block off certain sections. So that way the user when they’re looking at it, like can see that standing alone is standing by itself. And how we do that is we have to not only we have to special are specified the border style, which is solid which is just a solid line, the border with how thick we want that border and what color we want that border. Now if you do not if you can basically just set up these three things alone and be you can have a nice border it’ll just be a perfect box or rectangle. But now if you wanted a little bit of rounded corners, you can set that up to a border radius, and you can set up between pixels or percentages.
So let me go through all of these values that we can use for borders. So for border style values, we can use dotted dashed solid double group reg and SAT and SAT outside. Most of the time, here’s when you solid but maybe once in a while, you might want to use double or dotted there’s a ton of other things that you can play with. And I highly recommend you going through and just testing stuff out for yourself. But I would say 95% of the time I just use solid just because that’s the that’s more appealing. That’s just it is just a very generalized works for everything type of style. Now, the border with you it basically you can have, you know, one pixel 100 pixels, you can have it as wide or as thin as you want. Now, I usually, most of the time, I will between one to five pixels when I’m setting up a border depends on what I’m trying to achieve and what looks best. And every time I’m in, I’m in the CSS and I’m playing around with it. I’m you know, I’ll test different things out and to see what’s more visually appealing, but you can by all means you can get as large as you want. But also to is when you’re talking about border colors, I mean you can use any ones you want. Now if you just want a straight black or a blue you can use the regular just the preset colors that CSS and HTML use. Or you can use your hexadecimal as your RGB or RGBA colors and if you need a reference now you can go back to the color values slide and review that section but I think by this time you probably have a good idea of what colors you want to use and how you’re gonna be able to manipulate them. And also to is your border radius. You can use either pixels or percentages of what exactly you what’s the radius that you want. So with that being said, let’s just hop over into code pen and see how we can set up our borders.