Iâm just going to push back a little on you here and say that creating something basic and similar to the example is not the point. The point is to further your understanding of HTML/CSS and responsive design. If you think you did that with this project then great. But if not, then I would scrap what you have and start over from scratch because you are only robbing yourself from learning.
Hey @marxy2810!
I found some issues when I resized the browser window to be smaller.
When it comes to the design, yes it is similar to the FCC sample colors and layout. But you did inject some of your own personal touches like the box shadow in the middle. That was a nice addition.
I donât think you need to scrap this project and start over. For future projects there is nothing wrong with simplicity but donât feel like you are bound to the stylistic choices of the FCC samples. Remember that the projects only have to be functionally similar not stylistically similar.
Hope that helps!
Congrats on your first project!
Yep, fair comments. What I meant was that I wasnât trying to do anything spectacular here, its very early in my learning so I was happy to be able to put the bits and pieces together, did I understand why and what I was doing. So I suppose mate yep, I would agree that I did definitely learn something. Appreciate the feedback though.
Oh wow I never noticed that. Not even sure where to start to fix that
Thank you, yeah I didnât do anything out there because I mean I could have changed colours etc etc but I was focused on getting the job done. I will probably use this as a canvas for trying new things over time.
Also thank you v much! Glad to finally get something out of my learning.
For the box shadow, it looks like this might be your issue.
/*img caption*/
margin: 40px 300px 150px;
I would reset the margins for smaller devices. This might work.
#img-caption {
margin: 100px 0;
}
For the image, I just deleted margin-top:-250px;
from smaller devices and that seemed to work.
My hero. Worked perfectly. I suppose a case of over engineering at times. Like the margin-top for example, which didnât need to be there.
Thank you!
Welcome to the forums @marxy2810. Your page looks good. Some things to revisit;
- Do not use the
<br>
element to force line breaks or spacing. Thatâs what CSS is for. - Accessibility is about being accessible to all users. Review the lesson about giving meaningful text to links.
-
Web Accessibility in Mind has a more thorough explanation.
- âwikipedia entryâ is not accessible
-
Web Accessibility in Mind has a more thorough explanation.
- Make the project from scratch, with your own code, style and content. Donât take code from the sample project.
- There are parts of the HTML and CSS that look the same as the sample project. For instance, this
property: value;
pair;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
You neitherlink
to âRobotoâ (head
element in HTML) orimport
it (CSS). It shouldnât be here. One or two fonts with a fallback font will suffice.
- There are parts of the HTML and CSS that look the same as the sample project. For instance, this
- Keep your like media queries together.
- You have two instances of
@media (max-width: 460px)
. Just have one and put the selectors into that one. It will make maintenance easier.
- You have two instances of
- I donât normally comment on someoneâs design choices because itâs what they choose but I find this odd. You have;
<p id="quote-p"><span id="quote-big">â</span>Nevin Spence is still the blueprint for what we want from every Ulster player<span>â</span></p>
And you styled it as;
#quote-big {
font-family: "Merriweather", serif;
font-size: 40px;
}
Couple of things about it;
- you neither
link
to (head
element in HTML) orimport
(CSS) the Merriweather font. (And why would you just for quotes?) - There are huge quote marks at the beginning of the quote but normal ones at the end.
If thatâs a style choice ok but, it looks odd.
Thank you for the feedback @Roma.
-
I didnât realise I had a left that in there. All of it looks the same after while. - Given the sample uses âwikipedia entryâ I did the same.
- Fair comment - I looked at these fonts etc in the sample before starting and thought I would use them and never cleared them out. Some times it is difficult not to copy code if what you plan to write is already written in front of you, no?
- Not sure what you mean about the media queries - how do I put them together if the two selectors have different font-sizes??
-
- Similar problem to before, was supposed to take that out as obviously it defaulted to the serif font. 2. Not a choice, I struggled to get the quote marks at the end big as well, but Iâve since managed it.
Really detailed and quality feedback. Much appreciated and thank you. Hopefully the changes I have made reflect said feedback. Only trying to get better!
You are missing the property on the transitions. You have to tell the transition what properties it is you are transitioning.
For example for the scale() function, it would be transform
.
#quote {
margin: 50px 0;
transition: transform 0.3s linear;
}
#quote:hover {
transform: scale(1.1);
}
These two media queries are for the same screen size and the two selectors target different elements. Doesnât matter that the font sizes are different.
Your statement is like saying at full screen, h1
and #img-caption
cannot have different font sizes.
@media (max-width: 460px) {
h1 {
font-size: 3.5rem;
line-height: 1.2;
}
}
@media (max-width: 460px) {
#img-caption {
font-size: 1.4rem;
}
}
On a side note, if they were styled with relative sizes (em, rem) initially, rather than hardcoding a pixel size, you probably wouldnât need a media query.
The projects arenât just another challenge. Each one is meant to be a significant step in your progress. Every project you do will require research, planning, trial and error, and strengthening your skills beyond what you gain from the incremental challenges.
Donât look at the sample projects code as a way to do your projects.
Good job on cleaning things up.
Happy coding!
To be fair that is how the media queries are done in the example project. Each media query is placed below the selector that it is changing styles on.
I often prefer it like that as I can more quickly find the selector and see the style changes in the media query without having to scroll all the way down and then have to find the selectors in some big media query with all the changes to all elements at that breakpoint.
Sure you get some media query duplication, but personally, I like the structure and organization it gives. But you do have to be mindful of the cascade when doing so as well.
@lasjorg, yes I realize there are two schools of thought on that and Iâve read the pros and cons of both.
Guess itâs just been ingrained on me to use one because of the last couple of places that Iâve worked.