DEV Community

Discussion on: In Swedish, are HTML elements "i" or "på" eachother?

Collapse
 
jonaspetri profile image
Jonas Petri

I’d say it’s both. In how HTML is written, it is with no doubt “i”. But in how it is displayed, I’d argue it is also both. If you have a small green box, and inside the element you put a big red box, it will be “på”. But if you add the overflow: hidden; CSS rule for the green box, the red box will be “i”.

Collapse
 
baenencalin profile image
Calin Baenen

And it's "på" the green box, even if it's still technically "i" the green box?
(Because assuming there's no other styling except for the overflow:hidden; case, the green box would expand to fit the red one, if I remember right.)

Collapse
 
jonaspetri profile image
Jonas Petri

To be clear, I meant something like this:

<div height=“50” width=“50”>
  <div height=“50” width=“50” style=“padding:25px”></div>
</div>
Enter fullscreen mode Exit fullscreen mode

In this case the inner div will arguably be “på” the outer div as long as you don’t add the overflow: hidden; css rule.

Thread Thread
 
baenencalin profile image
Calin Baenen

Thanks.
This is very useful!