Matthias Apsel: ::after und clear:both

Beitrag lesen

Om nah hoo pez nyeetz, Linuchs!

div.inhalt div:nth-of-type(1) {

width: 48%;
  float: left;
}
div.inhalt div:nth-of-type(2) {
  width: 48%;
  float: right;
}

  
Das geht auch kürzer:  
~~~css
div.inhalt > div {  
    width: 48%;  
    float: right;  
}  
div.inhalt > div:first-of-type {  
    float: left;  
}

Matthias

--
Der Unterschied zwischen Java und JavaScript ist größer als der zwischen Bor und Borg.