
Solution retrospective
At first, I made the links into colored divs that changed color when hovered. However, the only way to click the links are to actually click on the texts, but I wanted the whole div to be clickable. So, the most obvious way to fix that is to actually turn the divs into buttons. So I used the < button > element with the onclick attribute to make the buttons click to open the links.
I've also finally used media queries to make the screen responsive for mobile. I believe I've got it as close to the mobile design as possible. It's still a work in progress.
What challenges did you encounter, and how did you overcome them?When I used to the button element to link the websites, it would open the links in the same window. I wanted to them to open in a new tab/window but target="_blank" does not work with the button element. At first I found a small javascript code that would open the link to a new window but since I'm not learning javascript yet, I wanted to stick to HMTL/CSS for now. After searching around I found this snippet:
<button onclick="window.open('https://www.example.com', '_blank')">
Open in New Window
</button>
And it worked!
What specific areas of your project would you like help with?Continue practicing and working on responsive design. I feel like I'm improving more and more with each challenge. As always, tips and advice are very welcomed!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on vanbyu22's solution.
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