Keep text from wrapping around floated image

后端 未结 3 1948
离开以前
离开以前 2021-01-27 12:58

I currently have an image that is floating left, and a block of text that rests to the right of it. That block of text is not current floated, it just comes after the image in t

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-27 13:26

    FIXED ANSWER

    Just float the text as well. :)

    http://jsfiddle.net/Hs7pN/

    #image
    {
        background-color: #09C;
        float: left;
        height: 200px;
        width: 200px;
    }
    
    #text
    {
        float: left;
        width: 400px;
    }
    

提交回复
热议问题