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

Chat-app illustration Html & Css

AbdulKareem•170
@seniorteck
A solution to the Chat app CSS illustration challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


after spending a couple of days trying to style the body with background property. I finally figured I was styling it in the wrong way I think, so I created a div with an empty element for the background to make it work, I don't know if this is the best practice, I used HTML & CSS for the project, would have loved to use sass but I am still a beginner.

any thought on how I can improve better on my code. pls would love to hear it. thank you

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Joran Minjon•610
    @DrKlonk
    Posted over 4 years ago

    Hi AbdulKareem,

    I would also check out the accessibility issues in the generated report. Those are quite relevant.

    Design wise, the biggest thing for me would be the font and the way the text is styled. Check out here how to add a font to your page.

    The padding on the paragraph makes it off line with the heading, which looks strange. I'd just remove the padding.

    Also, your background is a bit darker than the design, making for less contrast on the paragraph, which makes it a bit more difficult to read.

    In the code you use px and em for sizes a lot, I think it's well worth looking into using rems for all your sizes. It allows you to resize basically your entire site by setting the font-size in a media query. Check out this article on px vs rem, or do some googling on it.

    Cheers, Joran

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

    Greetings, AbdulKareem! 👋

    Good effort on this challenge! 👍 Your CSS illustration looks pretty nice! 🙌

    I'd like to suggest adding a max-width to the main container or wrapper of the page to prevent the content of the page from becoming too wide when the width of the screen increases in the desktop layout.

    As for the background shapes in this challenge, I think an easy way to add and position them would be to use pseudo-elements on the body. You could give each of the background shapes an explicit width and height and absolutely position them relative to the body of the page. Just remember to set overflow: hidden to the body then to avoid any overflow issues. 😉

    Keep coding (and happy coding, too)! 😁

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 4 years ago

    Great work on your css you got there. Though some little small things is not present like the arrow-left button and the 3 little smalls dots but is fine for now.

    Regarding your queries. Okay practices.

    • In this challenge, well there is the upper and bottom background parts right, so as we noticed they are not really a important component in here, so creating div elements for them seems unnecessary, what we could do is that use the body tag psudo elements body::before and body::after. We could just use them instead of creating divs right for the background. Using these pseudo elements really helps us to avoid unwanted elements in the structure, like again for example. The top part of the mobile, the cut out, the color white. Instead of creating a div for that, we just use again the ::after of the .mobile-wrap selector. So when creating things, look for a way to minimize your html.
    • Foreground. As I noticed, your mobile seems not popping out like it should do, since the background-color of the mobile is white. So adding those box-shadows really helps the user eye to identifies boundaries of different components.

    But as you code further, you will get better and better as long as you think first about the layout. List the components which you think have the same styling as other components, so that in your css, you could reuse such selector for different elements. By the way, learning sass is simple, it's like you're just writing css, and it really is, you're just writing css with the addition of preprocessed outputs.

    Good work and good luck for further coding^^

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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