Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Rest countries API using HTML/CSS/JS

sivaram•135
@s1varam
A solution to the REST Countries API with color theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have a few questions to the community, kindly help me in resolving them.

  1. How to add the search icon to the input box and back icon to the back button?
  2. Challenge says that individual country data is to be displayed in a separate page. If we display it in a separate tab, how to navigate to the current tab using back button? Right now I've shown/hidden the country grid view and details view.
  3. How to style border countries to similar widths/heights in the grid? Thanks in advance!
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Gerardo•90
    @JRaOr
    Posted over 3 years ago

    Hello,

    For the input box with the search button, you can add the input and an image tag inside a div, and use css to style them, i used react icons for that. but with pure css can be acomplished. For the second point, I'm not sure how to help you with javascript vanilla, but using NextJs makes it easier and it's not that difficult. With HTML i think you could use some queries to pass the country name in the url. For the third point i used tailwindcss, makes easier style small projects and use grid. I hope it helps.

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

Oops! 😬

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

Log in with GitHub