Home  >  Article  >  Web Front-end  >  What should I do if the css border cannot be displayed?

What should I do if the css border cannot be displayed?

藏色散人
藏色散人Original
2021-04-25 09:47:116439browse

The solution to the problem that the css border cannot be displayed: first open the corresponding HTML code file; then find the border code part; finally reset the width or add "box-sizing".

What should I do if the css border cannot be displayed?

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

css has written that the border display is incomplete or not displayed

div{
width: 100%;
border: solid 5px green;
}

At this time, the border display may not be fully displayed, not all the top, bottom, left and right, or the border may not be displayed,

width: 100% If the border exceeds 100%,

reset the width or add box-sizing.

Width 100% does not include margin, border and padding

Other reasons have not been discovered yet.

div{
width:97%;
border: solid 5px green;
}

【Recommended learning: css video tutorial

The above is the detailed content of What should I do if the css border cannot be displayed?. For more information, please follow other related articles on the PHP Chinese website!

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
Previous article:How to hide div with cssNext article:How to hide div with css