How to make a div fill a remaining horizontal space?

前端 未结 25 1951
野的像风
野的像风 2020-11-22 00:45

I have 2 divs: one in the left side and one in the right side of my page. The one in the left side has fixed width and I want the one of the right side to f

25条回答
  •  清歌不尽
    2020-11-22 01:39

    Here is a little fix for accepted solution, which prevents right column from falling under the left column. Replaced width: 100%; with overflow: hidden; a tricky solution, if somebody didn't know it.

    
    
    
        This is My Page's Title
        
    
    
    
        
    left

    http://jsfiddle.net/MHeqG/2600/

    [edit] Also check an example for three column layout: http://jsfiddle.net/MHeqG/3148/

提交回复
热议问题