J
J
jreznot2013-12-14 17:09:16
JavaScript
jreznot, 2013-12-14 17:09:16

How to get real block size on screen for WebKit?

There are two blocks that occupy 50% of the screen width. Each of the blocks has two blocks with 100% width, arranged vertically. Example: jsfiddle.net/Xr73W/5 . If you change the width of the viewport, you will notice that the title frames are sometimes drawn smaller in width than the content. Below the blocks are various block widths.
How to get the actual width of the top and bottom boxes on the screen using JS for WebKit? Perhaps there is some recipe to bypass this artifact?
Chrome dev tools show wrong width (407px, even though the whole picture is 406px):
h_1387050857_9159129_a10eb81732.png
PS In Firefox, everything is displayed correctly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur Yenokyan, 2014-12-06
@archybaldo

if I understand correctly use this
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question