Now that you got the basics down, lets talk about something that really helps you spruce a template up:
Borders
Table of contents:
Type
Color
Size
Radius
Border images
Short vs Long hand coding
Mix and Matching
There's many different types!
solid, double, dotted, dashed, groove, ridge, inset, outset
These look very different depending on certain things (size, your background, and the shape you chose for your border edges). Don't be afraid to experiment!
There are so many ways for you to write color code, but since this is not a post about color I'm going to stick with the basics.
Go to this website and find a hex color code you like (#xxxxxx)
^that's black!
Another neat trick is you can control the transparency of your border. For Hex color codes you just stick the '99' on at the end of it. You can decrease the number for more transparency.
Code:
[div=max-width: 800px; background-color: pink; border-radius: 75px; border: 5px solid #00000099; padding: 40px; margin: 30px; ]
[/div]
As you can see my black border (#000000) turned into a dark pink by being made transparent. This transparency trick has a lot of applications and there's a lot more that goes into it, but for now, just know that you can use the '99' trick on your hex color codes to manipulate your border for cool effects, like this:
This one is easy peasy:
Increase your number, get a bigger size.
Things get fun with radius. Do you want rounded corners or square corners?
If you just want one shape you can write it like:
0px is a square corner. The higher the number, the rounder the corner. Yes, you can turn the div into a full circle. No, I will not be showing that here xD
However many people like to mix and match the corners, like in my example above. To do this you need to use a different code:
Code:
border-radius: 0px 15px 50px 90px;
I've slowly increased the number so you can easily see which side they each adjust, but for easy reference they order like this: Top left, top right, bottom right, bottom left
I've only had mild success with this, but it is possible. You can take an image and put it in as your border.
Tips: It all comes down to the picture. Pick one with an interesting top, because that's all that's going to show. OR pick one that is small and easy to repeat as a pattern. I haven't had the gumption to fuss much with this but I'll give you the code that worked for me.
Code:
border-top: 10px solid ; border-bottom: 10px solid; border-right: 1px solid; border-left: 1px solid; border-radius: 75%; border-image: url(https://i.imgur.com/0mURjLz.png) 40 stretch;]
Good luck!
There's typically a short way and a long way you can write code to get a task done. There are pros and cons to both.
Short hand coding is faster, cleaner, and easier to read. However it often limits the customization you can do.
Long hand coding is tedious, easier to mess up, and can easily overwhelm a newb if something goes wrong. However, you can do so much more with it.
I would suggest being flexible between the two and always stick to short hand if you don't need to customize. Clean code is happy code. Here's what they look like for borders:
Long Hand
Code:
border-size: 5px; border-style: solid; border-color: #000000;
Short hand
Code:
border: 5px solid #000000;
If you feel confident with that, you're ready for this final step!
The best part about borders is their flexibility. You can take EVERYTHING you've learned about and mix and match it to your pleasure. Here's some examples.
This is done through a new combination of short and long hand:
Code:
border-top: 6px double pink; border-left: 1px solid green; border-right: 10px dotted blue; border-bottom: 7px groove purple;
Tell us what you want for each side (top, left, right, bottom) using that exact pattern above and you're golden. Go experiment, there's a lot more out there for you to discover!