flexible Länge der Abbildungsbezeichung

  • Hallo.
    Ich habe meine Abbildungungen und die zugehörigen Abbildungsbezeichnungen mit dem <div> </div> Einschluss eingebunden.


    <div class="images">
    <A HREF="../bilder/x.jpg">
    <img src="../bilder/x.jpg" style="float:left; margin-right:10px; margin-bottom:10px; margin-top:10px" width=400 alt=""></a>
    <p class="Abb">Abbildung 3.8.2: x</p>
    </div>


    Nun habe ich noch einen Frage zur CSS.


    Einige Abbildungsbezeichnungen sind sehr lang. Daher wollte ich für einen fließenden Text (an eingen Stellen soll neben dem links stehenden Bild, rechts der Text stehen) die Breite für die Abbildungsbezeichnungen begrenzen.


    Durch


    #images{
    float:left;
    width:400px; }


    in der styles.css konnte ich dies auch. (also lag ich wohl prinzipiell nicht falsch). Allerdings sind nicht alle Bilder einheitlich 400px breit.
    Gibt es ein Form für die css, um die Breite der Abbildungsbezeichnungen entsprechend der Bildbreite anzupassen?


    Vielleicht sowas wie:


    #images{
    float:left;
    width:=img widht oder =img}....??



    Danke euch, sunshine (wenn möglich ohne java, da ich recht neu in der Materie bin)


    meine styles.css lautet:



    body {background: #EDF2FF;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    color: #4D65A0}
    h1,h2 {margin:0}
    h2 {border-top:2px solid #4D65A0; padding-top:10px}


    h1 {font-size:14pt; margin-bottom:14px; margin-top:28px; line-height:1.2;color: #4D65A0}
    h2 {font-size:13pt; margin-bottom:13px; margin-top:26px; line-height:1.2;color: #4D65A0}
    h3 {font-size:12pt; margin-bottom:12px; margin-top:24px; line-height:1.2;color: #4D65A0; margin-top:0;}
    h4 {font-size:10pt; margin-bottom:6px; margin-top:11px; line-height:1.2;color: #4D65A0}
    h5 {font-size:10pt; margin-bottom:0px; margin-top:0px; line-height:1.2;color: #4D65A0}
    li {font-size:10pt; line-height:1.35;color: #000080}
    ol {font-size:10pt; line-height:1.35;color: #000080;style="margin-right:2em";style="margin-left:2em"}
    a {text-decoration:none; font-weight:bold; font-size:10pt; line-height:1.2}


    p, td {margin-top:12px; margin-bottom:12px;
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }
    p.abb {margin-top:0; margin-bottom:12px;
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    clear:left;
    text-align:left;}


    p.foto {margin-top:0; margin-bottom:12px;
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }
    p.mehr {margin-top:12px; margin-bottom:12px;
    font-size:7pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }


    .top {font-size: 7pt;
    line-height:0.75;
    text-align:right;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }


    .noprint {margin-top:12px; margin-bottom:12px;
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }


    .images {
    float:left;
    }
    p.tabelle {
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }


    img {margin-top:0; margin-bottom:12px; padding:inherit;
    font-size:10pt;
    line-height:1.35;
    color: #4D65A0;
    font-family: "Sans Serif", "Trebuchet MS", Arial, Helvetica, san-serif;
    }
    img_alt {padding:20px align=bottom}
    div {clear:both}

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!