Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 4 years ago

Just HTML, SCSS and Vanilla JavaScript

Agata Liberska•4,075
@AgataLiberska
A solution to the Base Apparel coming soon page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Any feedback on the project is welcome, but I also have a question about semantic HTML.

I initially planned to use CSS grid to position elements in desktop layout, but to achieve that, I had to pull the image container outside of the <main> element. I wasn't happy with having just a random <div>, so I thought of changing it to <aside> but I thought that it wasn't the best choice either as it literally has no content in it.

I ended up just positioning the image absolutely which I think is the simplest solution here and I'm happy with it, but would love it if someone could comment on my <aside> problem, just so I know for the future :)

Thanks!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Dave•5,295
    @dwhenson
    Posted about 4 years ago

    hey @AgataLiberska amazing work! 👍 This looks total great and pretty much pixel perfect too - I can never get that right.

    Nice approach with the absolutely position div. I'm no expert, but I think that is more semantically correct than an aside here, which should really contain content "only indirectly related to the document's main content", which isn't really the case if you are using a background image.

    I can't really add much value to your work but here are some, very small, suggestions you might like to consider:

    1. Design-wise - as I said it looks great to me, my only small suggestion would be to add a max-width on the input so that it doesn't stretch too wide on smaller screens?

    2. My only other suggestion would be to add the novalidate attribute through the JavaScript rather than in the HTML. That way if the JS fails for any reason you can still take advantage of the in-built browser validation.

    Both these are really small points!! Really like what you've done here. Cheers! 🙌

  • ApplePieGiraffe•30,525
    @ApplePieGiraffe
    Posted about 4 years ago

    Hey there, Agata Liberska! 👋

    Just wanted to drop in to say good job on this challenge! 👏 Your solution scales up/down very nicely (something that I had a little trouble with when I worked on this challenge)! 😆

    One idea I had about your challenge with the layout is that it's very easy to overlay elements with CSS grid, so you could have put the image inside the same container as the rest of the main content of the page and then wrapped that container and the header in a grid container. Then, you could make the main content full screen and simply place the header in the top-left corner of the screen and overlay it over the main content. IDK it that's a best practice, but it's a thought. 😅

    Keep coding (and happy coding, too)! 😁

  • Sven•295
    @Sven72
    Posted about 4 years ago

    Hi @AgataLiberska, maybe ARIA-Label is what you are looking for. (In case you don't want to use randomly div's due to accessibility reasons.) If so, I found this explanation to ARIA, which is helpful: https://stackoverflow.com/questions/22039910/what-is-aria-label-and-how-should-i-use-it And especially this MDN article about img:role ttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Role_Img Cheers, Sven

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub