Do you have something to do in code, design or animation and you don't know how? Send us an e-mail and will do a tutorial which will solve your problem.
Documentations for any level of knowledge, from beginners to advanced programmers, and even for those who just want a 'piece of code'
Background images for components
+ Share and Enjoy
Author: Cristea Iulian
2 from 12 vots
Vote this article
You want to set a background for a form component? Here it comes:
Set a class style sheet first and put the url to your image right there. Of course, there is only one line that you need but I strongly recommend to create a class for a few important reasons:
- you can change the image name or path much faster being set in only one place;
- you'll have a clean code, HTML separated from CSS;
- can be easily added new styles to your components.
Anyway, the decision is your, it's correct in both ways.
In our case we have the following simple CSS code, you only need to change the image name or/and path: