2

Take a look at this;

http://jsfiddle.net/k2zyz/

Why is the 100% width tab exceeding the container? The content in the container also has a 100% width and this works just fine?

4

2 回答 2

4

Because the width of the content area is 100%, then you have to add margin, border, padding...

Try:

box-sizing: border-box; width: 100%;

于 2011-11-02T20:18:09.650 回答
2

That's because of the padding 10px.

.dc-slick .slick-tab, .dc-slick .slick-tab-image { padding: 10px }

Those extra 20px ( 10px from left and right ) is causing the overflow. If you have firebug installed or a tool like that, such things can be easily figured out.

于 2011-11-02T20:18:39.440 回答