Hello everyone!
I decided to make this little post explaining the basic code to make a theme. My basecode is already outdated (I'm updating) and then some code stopped working, so today, I will do my best to help you. (This tutorial is also available in portuguese here).
Let's know the main tags to build a theme:
<html>
<head>
<style>
</style>
</head>
<body>
</body>
</html>
Now, we'll understand what each does:
<html></html>: Between these tags is the whole structure of your theme.
<head></head>: It is some scripts and fonts of words.
<style></style>: Here is all of your design theme, the whole design of it is between these tags.
<body></body>: All you created, the whole look of your theme is the style tag and it will stay in the body, as already says the same tag, the theme of the body.
Let's start making the theme?
Go on customize, delete ALL the codes that are there and paste the following code:
<html>
<head>
<title>{Title}</title>
<link rel="shortcut icon" href="{Favicon}">
<link rel="alternate" type="application/rss+xml" href="{RSS}">
<meta name="description" content="{description}" />
<style type="text/css">
</style>
</head>
<body>
</body>
</html>
Now, we'll understand each one of them:
<title>{Title}</title>: The title is the small title that appears in tab the blog in front of favicon (see this image).
{Favicon}: The favicon is the small icon that appears in tab the blog (see this image).
{description}: You can write something about you or about your blog, this description may have the size you want.
<style type=“text/css”>: As you saw I just replace the <style> by <style type=“text/css”> because it's better, but not confused with it because nothing will change.
Now let's work a little on the style of theme. Paste the following code BELOW/AFTER the <style> tag:
body{
background-color:#BACKGROUND COLOR;
font-family:FONT OF WORDS;
color:#TEXT COLOR;
text-align:TEXT POSITION;
font-size:WORD'S SIZE;
background-image:url('INSTEAD A COLOR YOU CAN PUT A IMAGE');
background-attachment:fixed;
}
a{
color:#LINK COLOR;
text-transform:none;
}
a:hover{
color:#LINK COLOR PASSING THE MOUSE;
text-decoration:none;
}
Again, we'll understand each:
Background-color: is the color of your background.
Color: it's your theme color of text, here is a table of the colors you can use.
Text-align: it is the position of text. It can be: center, left, right or justify.
Font-family: it is the source that you will use, can be verdana, arial among others, can also be a source of your computer.
Font-size: is the font size of your theme, the value of it's always in px, then whenever you increase or decrease the size put a number and in the end put px, for example:10px.
Background-image: if you want your background to be with an image instead of a color, put the link of your background there, but always respect (''), put your link ever between ('') so: ('HERE lINK'). To get the link of your background check this site, host your image and place the link.
Background-attachment: if your background is fixed or not, so that it is fixed only place fixed, and for it not to be, is absolute.
Text-decoration: read this tutorial and learn what it is.
Background-repeat: for your background repeat or not. To repeat is used background-repeat:repeat, and not to repeat is used background-repeat:no-repeat.
Padding/Margin: tutorial explaining the difference.
Now we will work with the title:
h1{ text-align:center; font-size:20px; font-family:WORD FONT; color: #COLOR FONT;}
::-webkit-scrollbar{ width:WIDTH COLORpx; height: 2px;}
::-webkit-scrollbar-track-piece{ background-color:#BAR COLOR; repeat scroll 0 0 transparent;}
::-webkit-scrollbar-thumb:vertical{ height:5px; background-color:#BACKGROUND COLOR VERTICAL; }
::-webkit-scrollbar-thumb:horizontal{ width:5px; background-color:#BACKGROUND COLOR HORIZONTAL;}
Width: is the width of something.
Height: the height of something.
Color of the scroll bar background vertically: the bar down together when we go down the page, there is the color.
Color of the scroll bar background horizontally: as it says, is the color of the bar that is "lying."
#sidebar{ position:fixed; width:auto; height:auto; margin-left:60px; margin-top:95px; border:3px solid #BORDER COLOR; height:285px; width: 252px;}
#sidebar img{ position:fixed; display:block; height:285px; width:252px;}
#sidebar: is the box for sidebar.
#sidebar img: is the image that is within your sidebar box.
postition: explained before.
margin-left: is the distance from the left side to the sidebar.
margin-right: is the distance from the right side to the sidebar.
border: is the border that is around all your box of sidebar.
display: the display property specifies the type of box used for an HTML element (learn more here). NEVER CHANGE THAT CODE
#desc{ background-color:#BACKGROUND COLOR; position:fixed; width:WIDTH OF DESCpx; height:HEIGHT OF DESCpx; font-size:SIZE OF WORDSpx; font-family:FONT WORD; text-align:center; color:#DESC COLOR; padding:5px; margin-top:450px; margin-left:100px; overflow:scroll; text-transform:none;}
Background-color: is the color of the box from your description, but if you want the description box has no color, only the color of the letters, just put background-color:transparent.
Overflow: scrollbar in the description, you can withdraw it putting none.
ALL THE REST ALREADY EXPLAINED PREVIOUSLY.
#links{
width:320px;
margin-left:58px;
margin-top:400px;
text-align:center;
position:fixed;
}
#links a{
float:left;
text-decoration:none;
text-align:center;
font-size:10px;
text-transform:uppercase;
font-family:verdana;
background-color:#070c0b;
color:#fff;
height: 18px;
width: 53px;
margin-right:1px;
line-height:15px;
padding:2px;
}
#links a:hover{
-webkit-transition:1.5s ease-in-out-multiply: 1.5;
-webkit-transition:1.5s ease-in-out;
background:#BACKGROUND COLOR PASSING MOUSE;
color:#WORDS COLOR PASSING MOUSE;
}
Float: the float property specifies whether or not an element should float.
Line-height: learn what is it here.
There are thousands of codes to explain and thousands of codes that are still lacking to compose a theme but that will be learned gradually.
Hope it helps you. :D