CSS: I can't set width to “auto” always appear 100%

后端 未结 7 871
太阳男子
太阳男子 2021-01-28 16:56

for some reason

the width of the div is 100% and if i set it to auto, nothing changes. tried display: block; and still nothing.

what I have in

7条回答
  •  深忆病人
    2021-01-28 17:22

    I think you want this result:

    
        project x
        
    
    
        This is a box
        This is another box
    
    
    .box {
        border: 1px solid #555; 
    }
    

    I just changed div to span! try to use proper HTML tags!

提交回复
热议问题