Pixel Border and Percentage width in Proportion

后端 未结 7 1951
误落风尘
误落风尘 2021-02-08 14:30

I think I might already know the answer to this one but I need a sanity check!

Say I have

#gridtest{
width:590px;
}

I could change the

7条回答
  •  抹茶落季
    2021-02-08 14:44

    If you want to stay semantic you can use div { box-sizing:border-box; } or some absolutely positioned :after elements. See the post How do I add 1px border to a div whose width is a percentage?

提交回复
热议问题