How can I improve my code? is my JS solution can be effecient or can be improved? Please check out my code and comment :)
Oluwafemi Olukoya
@Oluwafemi21All comments
- @BerkePalamutcuSubmitted over 2 years ago@Oluwafemi21Posted over 2 years ago
The only two things I noticed are the button style and the background color of the button when pressed. The submit button should have a
border:none
and the background-color of the 1-5 ratings should be grey and the hover color should be orangeMarked as helpful0 - @MrNomisSubmitted over 2 years ago
So this is just a beginners Project but i´m still not quite sure how to center something properly. In my desktop Version i hat to work with marings to center it horizontally which i think is not the best option for different screen sizes.....
so if anyone can help me with that would be appreciated.
@Oluwafemi21Posted over 2 years agoTo center things there are several ways. But the best two I can recommend is using flex and grid. The code for using flex goes thus
display:flex; align-items:center; and justify-content:center;
this would be the styling of the body element, since you want to center all your items in the middle of the page. same goes for the grid propertydisplay:grid; place-items:center;
and if you haven't learnt either flex or grid i implore you to learn it.0 - @St4niuuSubmitted over 2 years ago
Hi again! My next project's here. I am still getting better and better in js and CSS. What thing I've noticed is that when I zoom my website I don't have scrolls to move up or left. Kind of the certain part of site's just disappearing. What can I do with it? I have no idea. Thanks in advance
@Oluwafemi21Posted over 2 years agoIf you're looking for scrolls, it's either you have an overflow hidden or you set the height of the body to 100vh which is fixed. solution to the problem: change the height to min-height and set it 100vh. Your mobile view needs to be stacked on each other, if you're using flex for the calculator change the flex direction to column on the 375px media query. Also make sure the calculator doesn't show infinity when there is an error. Good job so far!.
Marked as helpful0