Home  >  Article  >  Web Front-end  >  The problem of margin failure after inline-block_html/css_WEB-ITnose

The problem of margin failure after inline-block_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:18:051495browse




aaa
bbb


The effect is as shown in the figure


Theoretically, the difference between these two divs should be 60px. In fact, in many browsers, there is an extra 8px
Please advise on display as inline-block In this case, how to accurately control the distance between two divs


Reply to the discussion (solution)

Please help me, thank you

There are ways Many

can use float: left margin-right
. You can add an inline-block
with a width of 60 in the middle. You can put a div with padding-right: 60
outside the first div. ...

Got it, thank you everyone

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn