I don't know how to use code template like you. Can you or anybody tell me how to use it?

O, quite easy. Just create a .html file with your code editor (a regular web page). Paste that template code into it, and place your HTML and CSS where indicated, and save. Then open that file in your browser.

That's why it's so much easier if people post their code here like that. Then we can quickly test it in our own browser.

Hm, you missed the point of that little template I posted. The point of it is to take the relevant parts of your code and stick them in where the red bits are. That is, paste the CSS where your CSS here and take anything between your <body> </body> tags and place it where it says your HTML here. Sorry it wasn't clear. Of course, if there is any JS on the page that's needed in the test page, you can place that in the template as well, in the same position it appeared in the original template.

What we are doing here is creating a new page for testing the relevant parts of your code. Before posting it, make sure to test it yourself, to ensure that it demonstrates the problem that needs fixing. E.g. paste the code you are posting here into a .html file, double click it and see what happens when it opens in you browser..