Responsive URL Shortening API Landing Page
Design comparison
Solution retrospective
Hi everyone, any feedback on how I can make my code neater and better is appreciated.
Community feedback
- @mseidel819Posted over 2 years ago
I put in a super long url, and my shortly code was cut off. Could you add a horizontal scroll for any urls that are bigger than my screen? I think that all you'll need is
overflow-x: scroll
oroverflow-x: auto
inside the css for the component that shows the long text.Another bonus would be to allow more than one shortened url to show up. So Instead of assigning the input to a string, you could push it into an array, then map over that array to render each url into its own container. Tools you can use:
const urlDisplay= document.querySelector(#containeryoureaddingto);
urlDisplay.insertAdjacentHTML(afterbegin, '<div>containers you'll add with each item of array</div>)
const urlArray=[ ];
urlArray.map((url)=>{})`I made up variables, so you'll have to change them as they apply to your app. Experiment with how you'll use the map function. I think there's a couple places you could fit it.
Marked as helpful0@Ugboaja-UchechiPosted over 2 years ago@mseidel819 Thank you for the feedback. I would work on it.
0
Please log in to post a comment
Log in with GitHubJoin 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