100% width is bigger than parent's div

后端 未结 3 1162
感情败类
感情败类 2020-12-29 02:34

I\'m working on vBulletin theme, but on thread list, every thread has 100% for its width but threads are also bigger than their parents, but when i remove border of threads,

3条回答
  •  别那么骄傲
    2020-12-29 03:00

    Always remember when you encounter problems related to width check dimensions of element through box model from firefox developer tool or from chrome's metrix box. Its alway a good idea to include

      *, *:before, *:after {
          -moz-box-sizing: border-box;
          -webkit-box-sizing: border-box;
          box-sizing: border-box;
         }
    

    Also make sure to check display property. If a element is made display inline it won't take width, margin & padding values and if it is displayed as inline-block it take width, margin & padding.

    Here is a link for box-sizing property http://www.paulirish.com/2012/box-sizing-border-box-ftw/

提交回复
热议问题