How to get real block size on screen to WebKit?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
16 views
There are two blocks, occupying 50% of screen width. In each block there are two blocks with 100% width, arranged vertically. Example: jsfiddle.net/Xr73W/5. If you change the width of the viewing window, we can see that frame headers are sometimes drawn smaller in width than the content. Under the blocks given different values of the width of the blocks.

How to get the real width of the upper and lower blocks on the screen using JS for WebKit? Maybe there's a recipe to get around this artifact?

The development tools in Chrome show the wrong width (407px, although the whole picture 406px):
h_1387050857_9159129_a10eb81732.png

PS In Firefox everything is displayed correctly
by | 16 views

1 Answer

0 like 0 dislike
if I understand correctly you'll need this
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
5 answers
asked Mar 28, 2019 by anVlad11
110,608 questions
257,186 answers
0 comments
28,082 users