@Islandstone89
Posted
Happy to help. Been a long day, hope some of this makes sense xD
Yes, you can copy and paste the Reset and use it in all your projects. Personally, I don't use everything, but I always include these:
*,
*::before,
*::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
margin-block-end: 0;
}
img,
picture {
max-width: 100%;
display: block;
}
input, button,
textarea, select {
font: inherit;
}
In terms of dimensions, you could set a max-width in rem on the .containers. I used to use margin: 0 auto quite a bit previous, these days my preferred method to center something is to use Flexbox. You can do this on the body:
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
All block elements (paragraphs, headings, divs, etc) are display: block
, so don't use it unless:
- You have an inline element you want to change
- You have given a display: flex and you want to change it back to display: block.
" is there any good practice to have all elements inside a container with a white space in between such as img, h2, p, and a tags?"
Do you mean how to space elements inside a container? There are several ways. If you want the same distance between all elements, you could set display: flex on the container, and give it a gap, usually in em or rem.
" in the future where to apply certain fonts and their weight to the elements?"
It depends. If the font should be used on all, or most of the elements, you should put it at a higher level, like the body. The descendants of the body will inherit the font properties. That is much more efficient than setting the same font properties on each of the elements.
@FrontEndHighRoller
Posted
@Islandstone89 Thanks for the feedback
Please check this out, I revised the project based on your comments
https://github.com/FrontEndHighRoller/3-Column-Preview-Card-Revised-
If there is anything to make it even better just let me know
Cheers