Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2006
    Messaggi
    484

    Galleria di immagini con liste di definizione

    Ho preso spunto da un articolo di Fulciniti presente proprio in html.it:
    "Esperimenti con le liste di definizione" per creare una galleria di immagini.
    Il codice proposto da Fulciniti è:
    codice:
    <div id="gallery">
    <dl>
    <dt>[img]sea.jpg[/img]</dt>
    <dd>Didascalia prima immagine.</dd>
    </dl>
    <dl>
    <dt>[img]sea2.jpg[/img]</dt>
    <dd>Qui il titolo o una breve descrizione.</dd>
    </dl>
    </div>
    Però, la mia galleria consiste in una serie di miniature che rinviano
    alle immagini a dimensioni reali. Avevo scritto una cosa del genere:
    codice:
    <div id="gallery">
    <dl>
    <a class="opacity" href="pics/australia/foto04.jpg">
    <dt>[img]pics/australia/foto04_small.jpg[/img]</a></dt>
    <dd>I ragazzi australiani in visita a Venezia</dd>
    </dl>
    <dl>
    <dt>[img]pics/australia/foto05_small.jpg[/img]</dt>
    <dd>Il benvenuto agli australiani al Parco Gazzera</dd>
    </dl>.............
    ma non passa la validazione. Infatti ricevo il messaggio di errore:
    # Line 68, Column 51: document type does not allow element "a" here; missing one of "dt", "dd" start-tag.

    …ity" href="pics/australia/foto04.jpg"><dt><img src="pics/australia/foto04_sma
    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "

    " or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    # Error Line 68, Column 55: document type does not allow element "dt" here.

    … href="pics/australia/foto04.jpg"><dt><img src="pics/australia/foto04_small.j
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
    Come posso salvare capra e cavoli?

    Grazie
    M.

  2. #2
    Utente bannato L'avatar di Braco
    Registrato dal
    Oct 2005
    Messaggi
    1,697
    Ci sono gallery già pronte qui http://jalbum.net/ la mia è come vorresti tu e mostra anche i dai EXTIF delle foto digitali è qui: http://jalbum.net/skins/skin/Photoman's%20skin

  3. #3
    <a class="opacity" href="pics/australia/foto04.jpg">
    <dt>[img]pics/australia/foto04_small.jpg[/img]</a></dt>
    i tag non devono intersecarsi
    Codice PHP:
    <dt><class="opacity" href="pics/australia/foto04.jpg">
    [
    img]pics/australia/foto04_small.jpg[/img]</a></dt

  4. #4
    Utente di HTML.it
    Registrato dal
    Dec 2006
    Messaggi
    484
    Hai ragione, classico errore
    da dilettante pure distratto...

    Grazie
    M.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.