When screen decreases in size background move's oddly

Hey there, So I had help creating this calculator to be a bit more responsive but I ran into an issue so when I decrease the size of the space around the calculator the background coloring moves with it how can I fix this?
No description
19 Replies
b1mind
b1mind15mo ago
hard to say without a codepen/demo of it. If I had to guess .. vw xD
R
ROP15mo ago
sorry lol! I think It may be a width issue 🤦
b1mind
b1mind15mo ago
Let content determine width
R
ROP15mo ago
I just caught onto it after messing around in Inspect Element I'll still send a CodePen
b1mind
b1mind15mo ago
maybe use a min/max but don't use vw units to do it.
b1mind
b1mind15mo ago
Yea just remove the width from .calculator and remove overflow hidden from body
R
ROP15mo ago
Alright let me give it a try! Oh perfect! I have one more question if you don't mind
R
ROP15mo ago
In the smallest width using inspect element the calculator looks like this (Got some button tweakin to do) What would you recommend I do to make the calulator somewhat smaller so it looks more appealing?
No description
R
ROP15mo ago
Ok so removing the width actually messed up the entire thing It became incredibily gigantic
b1mind
b1mind15mo ago
You can put some margin around it? then give it a max-width: maybe? I wouldn't use % but rem or px
R
ROP15mo ago
em?
b1mind
b1mind15mo ago
🤷‍♂️ you gotta make that choice
R
ROP15mo ago
sigh - the choice is confusing I wont even lie I still don't fully understand how to use em/rem
b1mind
b1mind15mo ago
I mean if you are using rem for fonts and user changes font you will want it to fit.
R
ROP15mo ago
I've watched kevins videos regarding it but its confusing
MarkBoots
MarkBoots15mo ago
I see you used my suggestion from this post. https://discord.com/channels/436251713830125568/1206832624778092614 Thanks for NOT responding to it, you're welcome!
clevermissfox
clevermissfox15mo ago
Use clamp on fintsuze and padding or width on vuttons in ems
R
ROP15mo ago
Im so sorry lmao

Did you find this page helpful?