I’ve just finished my first project for freecodecamp and I’m looking for some feedback mainly around whether the code structure is correct and general aesthetics of the page.
I really feel like I’ve been able to learn quite a lot while doing this even though its the smallest project, its been fun
Looks really good @Andy-R! There are a couple of changes I might suggest, but these are just my opinion. I would remove the top margin on your h1 tag and I would remove all margin on your body. That will push your header all the way to the top of the page and will remove the spacing around the edge of your page.
Also, if you replace the pen with full in your url it will open up without the code boxes open. so this: https://codepen.io/andy-robertson/full/OqXGQL instead of https://codepen.io/andy-robertson/pen/OqXGQL
But overall you did a great job. keep up the great work!
I made the changes and added a little padding to both the header and footer, it was strange as I hadn’t set a margin in the body but I was able to just use margin: 0; and set it to zero. You were right though it does look better, thanks for the advice!
One thing, run your CSS code through a validator. codepen provides you with one for HTML, CSS and JS. Just click on the arrow in the upper right of the section and then click on the respective ‘Analyze’ link.
You have a duplicate assignment in CSS
Beautiful professional looking project. Nice font selection.
The one thing I noticed is that the paragraph text shrinks too small in mobile view. It is hard to read at that point.
Oh, and increase the height of the footer (just my opinion).
Awesome project. I really loved the box shadow effect and the image of Albert Einstein. But can you increase the font size for mobile devices. I am using an iPhone 6 and it’s kinda hard to read . I had to zoom in to read the content and slide to the right to read the rest of the content.
I smoothed out and resized all the media query breakpoints for fonts so it should be much easier to read now at all screen sizes (hopefully), and I also added a little more padding to the footer
You set a lot of sizes in pixels. Setting pixel is not the greatest idea. It is better to use rem because pixels do not change in size.
For the width of the paragraphs:
In your media queries you and using min-width and max-width together. In my experience you only need to use min-width if you are starting at the mobile size and max-width is for when you start your design at desktop view and want to shrink your page smaller.
Mobile first media query example:
@media (min-width: 400px) {
/* your code */
}
@media (min-width: 600px) {
/* your code */
}
@media (min-width: 1000px) {
/* your code */
}
Going from desktop to mobile is like this:
@media (max-width: 1000px) {
/* your code */
}
@media (max-width: 600px) {
/* your code */
}
@media (max-width: 400px) {
/* your code */
}
That’s a neat trick for images, after reading this I actually used it around the other way also with min-width on the signature image and it’s now perfectly readable on mobile.
I hadn’t thought through px vs rem (and em) so did some additional reading following this I went through and converted the page over.
The media query caught me out at first because after removing max-width from them only the 1000px shift worked until I realized the order they appeared in the CSS now mattered, so after a quick switch around it all worked as before.
A very informative post Brandon, thanks for taking the time to put it together
A little tip about using Codepen for these projects. Everything that would normally go in the head section (if you had content in the head section that is ) doesn’t actually go in to HTML editor when you use Codepen. Instead go to Settings > HTML > and you will see Stuff for head . You don’t need to declare body tags either, think of the HTML editor as being the body of the HTML page. Hope that made sense.