开发者

How can I stop my <table> overlapping the rounded corners of its parent <div>?

开发者 https://www.devze.com 2023-03-25 02:40 出处:网络
I have a <table> with alternate colored rows in a <div> with rounded corners. Whe开发者_开发百科n I scroll vertically , the table overlaps the rounded edges and the edges are not seen roun

I have a <table> with alternate colored rows in a <div> with rounded corners. Whe开发者_开发百科n I scroll vertically , the table overlaps the rounded edges and the edges are not seen rounded.

Is there any solution to maintain the rounded corner?


Give your div a padding value equal to the radius of your rounded corner.


You could set the z-index of your table to be -1 or some other value so that the table corners are below your div when you scroll up. But if you don't want the corners of your table to appear rounded when you scroll up, then padding is your best option.


Use overflow: hidden; in the css definition.

0

精彩评论

暂无评论...
验证码 换一张
取 消