Why use percentage value for div's width in CSS?

前端 未结 8 1890
无人及你
无人及你 2021-02-13 11:09

I am reading articles about css. I found out that many of writers suggest to use % value for div\'s width or height.

I am using pixels all the time.

Why should I

8条回答
  •  旧时难觅i
    2021-02-13 11:35

    All in all, if you use images on your site, using percent for main contianer may not be the best approach. In that case, you'd want to use pixels.

    Advice: Use Pixels for main contianer and percent for content.

提交回复
热议问题