@Anirog
Posted
I only used one div .container
and then styled the elements in the .container
like this:
.container { . . . }
.container img { . . .}
.container h1 { . . . }
.container p { . . . }
Not sure if this is best practice but it was easier for me to keep the index.html file small.
I think what you did using max-width: 375px;
was better than what I did.
I just used width: 322px;
Your resets could be made simpler by using a wildcard selector *
which styles everything so instead of:
/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
margin: 0;
}
You could do this:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}