+ 1
JS calculator... Help!
Can someone explain to me how can I get the corect number from the button and then the value of the operation? (+, Ă etc)
8 Answers
+ 1
I'm coming back to check your progress.
Have you read the materials?
+ 2
1. Explanation
You have a large margin-left of 400px for your #scene,
1.1 when viewing on a computer with 1920px width, this 400px left margin puts the calculator in center.
1.2 when viewing on a mobile with about 300px width, you have to scroll right to see the calculator.
2. Here is some learning materials:
2.1. Use viewport unit vw:
https://code.sololearn.com/WrgbrFC038ma/?ref=app
2.2. Centering element with flexbox:
https://www.sololearn.com/post/37760/?ref=app
https://code.sololearn.com/WnNWl3XiEd84/?ref=app
https://code.sololearn.com/W51CLpHyrWy0/?ref=app
2.3. Another tutorial series suitable for you - Responsive Centered Square
https://code.sololearn.com/W593ZCiu560u/?ref=app
3. In case you can't work it out, here is a fix:
+ 1
https://code.sololearn.com/W2f0bV88rCdy/?ref=app
I copyed and paste from my PC
Idk why i dont have an output here... anyway i guess its ok
+ 1
that's what you should know!
now, i don't want to show you the fixed version.
please read the above and try to rebuild the UI.
Hint : don't position each button by hardcoding top and left, because it is not responsive.
Redo HTML structure, build the container first, position it in center, create two children of container, one for upper part, one for lower part, all buttons should be children of lower children of container.
0
Can you show us your code?
0
Rune Official: that's because of your css. Try to remove all css and you will see!
0
That is not what i want to know...
I wanna know how can I get the corect output for ea button in the calculator
0
Kinda