
King
@rymnddevAll comments
- @dripping-code@rymnddev
There are a couple of ways to center align content. What would probably be best in this situation is to use flexbox {display: flex; justify-content: center; align-items: center}. I really recommend you search and practice how to achieve this, and perhaps even resubmit this challenge.
@media queries are generally how one would create a responsive page, but that's not really applicable on this challenge.
Marked as helpful - @Afrianns@rymnddev
There are ways of doing it, and event delegation would probably be the most efficient method, but since there aren't that many dropdown menus, all you need to do is code it so that no matter what menu item you click, it will:
- hide every other menu
- reveal the menu that was clicked.
Hope that made sense! (Just experiment with it!)
- @johannesteshome@rymnddev
I did this same challenge with TailwindCSS, you can see my source code here: https://github.com/king-oldmate/FEM-advice-generator-app/blob/master/src/App.js
Anyway, I used the following class with arbitrary values for the shadow/glow effect: hover:shadow-[0_0_22px_8px_rgba(82,255,168,0.5)]
here's the documentation for it: https://tailwindcss.com/docs/box-shadow
Marked as helpful - @wmartyr@rymnddev
Well done. Looking at your code, we pretty much did the same thing. To load to a separate HTML file wouldn't even work, since the JavaScript would reload and you would lose your variable. No, part of the point of these easier exercises is to develop components, and those should be as contained (encapsulated) as possible.
Marked as helpful - @darthskyy@rymnddev
Good work.
I personally use Tailwind CSS for styling, but you could even use just plain old CSS if you wanted to try making the card yourself. Just break done the card into all it's different parts.
I prefer using Flexbox for alignment if I have multiple elements or need to center vertically, but if it's just one I will very often use margin: 0 auto;
- @z3sb@rymnddev
Well done, the layouts look great for both desktop and mobile.
I'm not sure if you noticed that you have some bugs in your JavaScript. Firstly, the active colour doesn't change when you choose a different time-frame (i.e. weekly always stays highlighted no matter what is active), and secondly, if you click anywhere in the options div it shows no data anywhere in your dashboard. You ought to have event listeners for each time-frame.
Keep it up!
Marked as helpful - @rymnddev@rymnddev
I think I do struggle with changing my mobile layouts to desktop ones. Any feedback on that point (especially in regards to using Tailwind) would be greatly appreciated.
- @jcasare@rymnddev
What really helped me is actually designing layouts for mobile first, and then adjusting as necessary for wider screens. Maybe start your next project with that in mind and see if you notice a difference.
Marked as helpful