I'm attempting to understand the exact relation between padding and border in CSS.
Would it be accurate to say that a solid border of transparent color is essentially the same thing as the same amount of padding, and can be expected to behave similarly- except insofar as they will coexist on the same element rather than overwriting each other?
In other words, is there any case in which:
#Square1{
padding: 50px;
}
, if replaced with:
#Square1{
border-style: solid;
border-width: 50px;
border-color: transparent;
}
would be expected to display different behavior in any meaningful way, except if there was something like this in the same CSS file:
.ClassThatSquare1HappensToHave{
border-style: solid;
border-width: 50px;
border-color: transparent;
}
, in which case you will effectively end up with twice the amount of border/padding/element-expanding space?
