+ 2

About css

can i put several border for an element?how?

7th Oct 2018, 2:34 PM
M@hdi
M@hdi - avatar
3 Answers
+ 2
Several ways you could do this! Firstly and most flexible, by using pseudo elements ::before and/or ::after along with the main one. Or, you could achieve the effect with box-shadow which allows several in a comma separated list. I.e. A coloured box-shadow with no blur looks the same as a regular solid border. Lastly, you could indeed nest it inside more elements with borders on them. I can make these into a live example if you need.
7th Oct 2018, 4:37 PM
Voxel
Voxel - avatar
+ 1
No, you can't. If you want many borders to be seen, nest many element inside each other and give each a border.
7th Oct 2018, 2:52 PM
Ulisses Cruz
Ulisses Cruz - avatar
- 2
CSS is all about cosmetics
7th Oct 2018, 2:58 PM
Anthony Perez