CSS: Special Fluid Layout Problems

前端 未结 5 730
情话喂你
情话喂你 2021-01-19 02:25

\"alt

See attached image. How is this accomplished? Gosh, I\'ve been going CSS for 8 years but somehow n

5条回答
  •  感情败类
    2021-01-19 03:00

    This is the most straight forward solution I could think of.

    Wrap both elements in a parent div set to relative positioning, then absolutely position the static side bar and set a margin on the responsive div the same width as the static sidebar.

    HTML:

        
    xx

    CSS:

      .wrapper {
    
        width: 100%;
    
      }
    
      .fixed {
    
        position: absolute;
        bottom: 0;
        left: 0;
        top: 0;
    
    
      }
    
      .responsive {
    
        margin-left: 250px;
    
      }
    

提交回复
热议问题