Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pinteresting
on July 9, 2021
|
parent
|
context
|
favorite
| on:
What does 100% mean in CSS? (2020)
In my limited experience I find CSS examples always make things look simple, but then in reality I'm forced to do something stupid like this for a 400px canvas:
left: 50%; margin-left: -205px; border: 0px; width: 410px;
Because when sized to 400px it always clips 10 pixels of the canvas.
woodrowbarlow
on July 9, 2021
[–]
i'd have to poke around to be sure, but i have a suspicion:
box-sizing: border-box; width: 400px;
might be the fix for that scenario
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: