+ 1

Difference between border and border-style,border-width and border-color

Hi guys! Can someone tell me which is the difference between p.firs and p.second? Both have the same output but i want to know which is the most used method and why. thank you! p.first { padding: 10px; border:2px solid #FF6600; } p.second { padding: 10px; border-style: solid; border-width: 2px; border-color: #FF6600; }

9th Feb 2018, 9:12 PM
Denis Peptanariu
Denis Peptanariu - avatar
2 Réponses
+ 1
Thank you!
9th Feb 2018, 9:25 PM
Denis Peptanariu
Denis Peptanariu - avatar
0
Both have the same output so u can use both. But if u want change one of border's property and dont touch other using for example JQuery or JS u should use p.second
9th Feb 2018, 9:21 PM
Женя Курятов
Женя Курятов - avatar