I'm currently seeing a video on youtube on how to create a responsive website
. He, at a certain point (minute 24.55), sets the margin of an image in percent rather than using the normal pixels. What I do not understand is what width or length the percentage is relative, ie these 2%
are in relation to what width? And 0
is exactly what? (I have a certain intuition, but with the CSS the intuitions, honestly, serve little.)
.mainheader img{
width:30%;
height:auto; /* automatically determines the height*/
margin: 2% 0;
}
In general, the percentages are in relation to what?