Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Elenco Numerato

  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2002
    Messaggi
    1,786

    Elenco Numerato

    Salve,

    devo fare un documento xhtml e css, con all'interno un elenco numerato così:

    1.1 Voce 1
    1.2 Voce 1
    1.3 Voce 1
    1.4 Voce 1

    come lo si fa ?

    grazie !
    [Scambio Links a Tema] Contattatemi in Privato x + Info.

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2005
    Messaggi
    2,245
    In css <html>
    <head>
    <title>Titolo del documento</title>
    <style type="text/css">
    BODY { background:#FFFFD1; color:#000000; text-align:left;
    margin-left : 250px; margin-right: 250px}
    ol {list-style-position : inside}
    ul {list-style-position : outside}
    </style>
    </head>
    <body>
    1. Prima voce
    2. Seconda voce
    3. Terza voce

    <ul>[*]Prima voce[*]Seconda voce[*]Terza voce[/list]
    </body>
    </html>


    in xhtml cioè html

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    1. 1
    2. 2
    3. 3

    </body>
    </html>

  3. #3
    il metodo più veloce (e forse quello più corretto tenendo conto del supporto attuale dei CSS da parte dei browsers) è secono me:

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
    <head>
    <title>Titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset= iso-8859-1" />
    <meta http-equiv="Content-Language" content="it" />
    <style type="text/css" media="screen">
    ol#lista{list-style: none;}
    </style>
    </head>
    <body>
    
    1. 1.1 Voce 1
    2. 1.2 Voce 2
    3. 1.3 Voce 3
    4. 1.4 Voce 4
    </body> </html>
    se lo pseudoelemento :before fosse supportata potresti fare diversamente...
    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
    <head>
    <title>Titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset= iso-8859-1" />
    <meta http-equiv="Content-Language" content="it" />
    <style type="text/css" media="screen">
    ol#lista:before { content: "1." }
    ol#lista{list-style: decimal;}
    </style>
    </head>
    <body>
    
    1. Voce 1
    2. Voce 2
    3. Voce 3
    4. Voce 4
    </body> </html>
    vedi http://www.w3.org/TR/2005/WD-CSS21-2.../generate.html

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.