0

I am so lost.... simpliest task and it just doen't work , i tried everything Why in this codepen example div block with class float simply doesnt float inside text, i mean why text isnt floating around div ?!?!? I tried many variants

https://codepen.io/antongrekov/pen/EBMbbY

tried float: left on p tab , float only on block, float on both, clear element, float on container....

.wrap
    p lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS] lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS] lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS] lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS] lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS] lorem lorem ads AsD ADOPF JDS[ FOPSAF S FSD SAD DS DS S DDSDS]
    .float
    .clear
.wrap
    background: #333
    border: 3px solid red
    width: 30%
    p
        float: left


    .float
        width: 50px
        height: 50px
        border: 5px solid green
        float: left
    .clear
        clear: both
Anton
  • 516
  • 1
  • 6
  • 22

0 Answers0