• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Blocksatz im Label

freakXHTML

Mitglied
Hallo zusammen,
ich möchte, dass der Text in einem <label> als Blocksatz angezeigt wird. Der Befehl text-align: justify; funktioniert aber nicht.

Könnt ihr mir helfen, das Problem zu lösen?

Vielen Dank
lg, freakXHTML
 
Werbung:
Was schreibst du denn für Romane zwischen diese Tags, dass es sich lohnen würde, ihnen diese Formatierung zu verpassen?
 
Werbung:
Bei mir funktioniert:

HTML:
<html>
<head>
    <title>Beispiel</title>
    <style type="text/css">
        label{
            text-align: justify;
            width: 500px;
        }
    </style>

</head>

<body>
    <label>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </label>
    
</body>
</html>
 
Aber nur im IE <= 5.5 bzw. Quirksmode

Du hast recht. IE6 schafft das aber auch. :oops:

Im Firefox 3.6 funktioniert es mit <p></p>

HTML:
<html>
<head>
    <title>Beispiel</title>
    <style type="text/css">
        p{
            text-align: justify;
            width: 500px;
        }
    </style>

</head>

<body>
    <p>
    Lorem Ipsum is simply dummy text of the printing and typesetting  industry. Lorem Ipsum has been the industry's standard dummy text ever  since the 1500s, when an unknown printer took a galley of type and  scrambled it to make a type specimen book. It has survived not only five  centuries, but also the leap into electronic typesetting, remaining  essentially unchanged. It was popularised in the 1960s with the release  of Letraset sheets containing Lorem Ipsum passages, and more recently  with desktop publishing software like Aldus PageMaker including versions  of Lorem Ipsum.
    </p>
    
</body>
</html>

 
Werbung:
Nein, der IE6 verhält sich auch nur im Quirksmode so.
Nur im Qirksmode und IE5.x wird durch width in deinem ersten Beispiel eine Art inline-block geschaffen.
 
Nein, der IE6 verhält sich auch nur im Quirksmode so.
Nur im Qirksmode und IE5.x wird durch width in deinem ersten Beispiel eine Art inline-block geschaffen.

Du hast vollkommen recht. Das wusste ich nicht. Ich hab ja das DOCTYPE in meinem Beispiel gar nicht gesetzt. Deshalb der Quirksmode.
Und wieder was gelernt. Danke! :razz:
 
Zurück
Oben