Hi all.
This is my Front End Library project # 1 - Build a Random Quote Machine
I had a bit of a hard time getting the divs to work they way I wanted. They kept going any and everywhere.
All the page is very simple, doing the front end is a challenge itself, since I did not want to use position absolute/relative solutions, but have a responsive design and feel. I believe mission was accomplished, but it is up to the public to confirm this.
Youâre using flexbox, which is great. If you understand flexbox, you shouldnât have issues positioning the relatively small number of divs you have. It looks like you handled the site the way you wanted it. I would not call your site responsive as the content is one size fits all at this point. Also, consider fetching from a real quote API if youâve never done that before. Good luck!
All in all it is good use of color. There are some bugs left:
I viewed on mobile (pixel 2 on chrome) but the #quote-box is overlapping the wrapper. its the width: auto that causes it, just remove it, the overlap will be fixed . In using flexbox, the use of width: auto will be lessened. It will be more of min-width, max-width, and/or flex-basis.
and if you want to take a step further here are suggestions of some of good practices in front-end:
Super cool suggestions, loved them
On #1, Iâve tried, but I keep getting an error (TypeError: null is not an object (evaluating âel.addEventListenerâ)) on my line
el.addEventListener("click", getNewQuote, false);
I believe its because the DOM is not completely loaded and there does not find ânew-quoteâ? Ideas?