Putting a Border Around Floating Elements

后端 未结 3 792
夕颜
夕颜 2021-02-03 22:13

Say I have something like the following code, where I want to display some text between two images that I am floating left and right.



        
3条回答
  •  醉话见心
    2021-02-03 22:51

    Adding an overflow in this case with a value of hidden or auto remedies the issue.

    Check the fiddle below:

    http://jsfiddle.net/XMrwR/

    Clearing floats the overflow way

    http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html

提交回复
热议问题