If i want to have border on the three sides, do I need to declare border for each side eg.
border-left:1px solid green;
border-bottom:1px solid green;
border-right:1px solid green;
or is there any shortcut way?
If i want to have border on the three sides, do I need to declare border for each side eg.
border-left:1px solid green;
border-bottom:1px solid green;
border-right:1px solid green;
or is there any shortcut way?
You don't need to declare the border-top
style
and then override it:Note: I wouldn't do this myself, personally; it could be confusing to those reading it, and there's really no need. Although the original way involves repetition, it's minimal.
this is a little shorter and does the same:
Well, there is a slightly shorter way - but it's not what you'd call a shortcut...
Or you could declare partial elements which would allow for clarity: