Update article.md
"CSS width is useless at all." -> "CSS width is useless." Could have also said "CSS width is of no use at all."
This commit is contained in:
parent
83bfe333ab
commit
b071f46c60
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ Why should we use geometry properties instead? There are two reasons:
|
|||
</script>
|
||||
```
|
||||
|
||||
From the CSS standpoint, `width:auto` is perfectly normal, but in JavaScript we need an exact size in `px` that we can use in calculations. So here CSS width is useless at all.
|
||||
From the CSS standpoint, `width:auto` is perfectly normal, but in JavaScript we need an exact size in `px` that we can use in calculations. So here CSS width is useless.
|
||||
|
||||
And there's one more reason: a scrollbar. Sometimes the code that works fine without a scrollbar starts to bug with it, because a scrollbar takes the space from the content in some browsers. So the real width available for the content is *less* than CSS width. And `clientWidth/clientHeight` take that into account.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue