Two floated columns - one fixed, one loose width

前端 未结 8 1149
醉酒成梦
醉酒成梦 2021-02-02 06:34

I\'ve looked around SO, but I cannot find one that matches my occurrence, I basically have two columns one fixed width (185px) and the other column has no fixed wid

8条回答
  •  野性不改
    2021-02-02 07:06

    The "position: absolute;" answer is pretty good, but it has cross-browser implications, especially if you're developing for IE. The best way to accomplish this is the following:

    
    
    
    
    
        

    Please note that the div you require on the right side is called first in the HTML. Also, note the clearing of the float after the columns, which will come in handy if you have content below, or if there is a parent container.

提交回复
热议问题