How can I do width = 100% - 100px in CSS?

前端 未结 18 833
借酒劲吻你
借酒劲吻你 2020-12-12 13:28

In CSS, how can I do something like this:

width: 100% - 100px;

I guess this is fairly simple but it is a bit hard to find examples showing

18条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 13:38

    Setting the body margins to 0, the width of the outer container to 100%, and using an inner container with 50px left/right margins seems to work.

    
    
    
      
    content here

提交回复
热议问题