CSS + Darstellungsproblem - Seite 2

Seite 2 von 2 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/css_darstellungsproblem_149270/page_2 - zur Vollversion wechseln!


Facetious schrieb am 14.09.2005 um 22:45

hehe
thx spikx

servas Facetious


watchout schrieb am 15.09.2005 um 12:51

achso... kann dir sagen was es is - hab deine Beschreibung wohl falsch verstanden. Du muusst nach dem Text ein Element mit style clear:both oder clear:left einfügen, das kann alles sein, div, span, br,...

z.B.:

Code: PHP
<div class="content">
        <span class="pic">
            <img src="imgNews/foo.jpg" alt="" width="50" height="50">
        </span>
        <span class="text">
            Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es Lorem Ipsum quot es  
        </span>
        <div style="clear:both"></div>
    </div>


Spikx schrieb am 15.09.2005 um 12:53

Ist aber afaik ein workaround, weil die Browser des falsch verstehen, oder? (Nur aus Interesse, i wü de Lösung jo net schlecht mochn :))


watchout schrieb am 15.09.2005 um 13:09

no, workaround is das mit dem parent float zu definieren, weil da sollte sich afaik dann lt. def. eigentlich nichts ändern...

Die Lösung von "mir" ist Standard und wirst überall sehen. Der Sinn ist dass ein Float den parsing-Modus ändert. Und Wenn ich jetzt ein Bild hab das Floated, und danach text, divs, spans,... haben die trotzdem einen Bezug zum Div auch wenn sie nicht rechts vom Bild stehen, denn sie *könnten* rechts davon stehen wäre das Bild höher. nach (bzw. in) einem Element mit Style clear:x kann das aber nicht mehr sein - ab da stehen die Elemente alle links - "Float-Modus" beendet, sozusagen ;)


Rektal schrieb am 15.09.2005 um 13:11

Nope. Das ist aufgrund der Spezifikation wie floats und clear funktioniert -> http://www.w3.org/TR/CSS21/visuren.html#floats


watchout schrieb am 15.09.2005 um 13:26

Zitat von Rektal
Nope. Das ist aufgrund der Spezifikation wie floats und clear funktioniert -> http://www.w3.org/TR/CSS21/visuren.html#floats
öh, ja so kann mans auch sagen :D


Spikx schrieb am 15.09.2005 um 14:42

oh :)




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025