Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    tag: "margin" e "lang", come si usano correttamente? help

    domandina:

    qual'è il modo esatto per scrivere i seguenti tag (dato che scritti così il validator li segna come erori):


    1)
    <body leftmargin="0" topmargin="0">

    per far aderire la foto di sfondo allo sfondo (credo?)

    2)
    <body lang="it">
    per dire che il doc è in italiano..


    GRAZIE
    O porti una soluzione, o fai parte del problema

  2. #2
    Quando una persona dice che il validatore dà errori dovrebbe anche specificare che DTD ha usato, affinchè si possa determinare la correzione in base alla specifica del linguaggio. Eh!

    Provo a indovinare? HTML 4.01 (se non è così è importante che tu me lo dica):
    1. gli attributi di stile vanno tolti dal markup e inseriti nel CSS;
    2. l'attributo lang va inserito nel marcatore HTML, non BODY (per lo scopo da te citato).

  3. #3
    esatto HTML 4.01 sorry..

    avevo intuito che lang va nella head e margin nel css... mi chiedevo la sintassi corretta per farlo (immagino che <BODY lang ="it"> nella head sia sbagliato, e lo stesso usare "<" ">" nei css...)

    già che ci sono ho incontrato un altro intoppo:
    le apostrofi... me le segna tutte come errore:

    <<non SGML character number
    You have used an illegal character in your text. HTML uses the standard UNICODE Consortium character repertoire, and it leaves undefined (among others) 65 character codes (0 to 31 inclusive and 127 to 159 inclusive) that are sometimes used for typographical quote marks and similar in proprietary character sets. The validator has found one of these undefined characters in your document. The character may appear on your browser as a curly quote, or a trademark symbol, or some other fancy glyph; on a different computer, however, it will likely appear as a completely different character, or nothing at all.

    Your best bet is to replace the character with the nearest equivalent ASCII character, or to use an appropriate character entity. For more information on Character Encoding on the web, see Alan Flavell's excellent HTML Character Set Issues reference.

    This error can also be triggered by formatting characters embedded in documents by some word processors. If you use a word processor to edit your HTML documents, be sure to use the "Save as ASCII" or similar command to save the document without formatting information.>>

    grazie
    O porti una soluzione, o fai parte del problema

  4. #4
    Aspetta, stai facendo confusione per quanto riguarda il lang. Tale attributo va inserito nel marcatore <html>: ciò si traduce semplicemente in questo:
    codice:
    <html lang="it">
       
    </html>
    Per quanto riguarda gli apostrofi, ricorda che tutti i caratteri speciali (come ad esempio le lettere accentate) vanno codificati nelle relative entità. Ecco una tabella per la conversione:

    - www.w3schools.com/html/html_entities.asp


  5. #5
    grazie infinite...problema risolto

    hai dimenticato però di spiegarmi come si scrive in css la seguente sciocchezza: <body leftmargin="0" topmargin="0">

    :-)
    O porti una soluzione, o fai parte del problema

  6. #6
    La sintassi CSS è la seguente:
    codice:
    body { margin:0 }
    Se vuoi sapere come creare un foglio di stile esterno, fai una ricerca nel forum di CSS e troverai tutti gli spunti e i suggerimenti necessari.


  7. #7
    uhm.... so come fare un css esterno, li sto usando...

    ma la sintassi da te scritta va nel css esterno? tra <style> interno, o nel body? nella head?
    O porti una soluzione, o fai parte del problema

  8. #8
    Originariamente inviato da WebDesign74
    uhm.... so come fare un css esterno, li sto usando...

    ma la sintassi da te scritta va nel css esterno? tra <style> interno, o nel body? nella head?
    Non capisco il motivo di tutta la tua confusione. Stai usando un CSS esterno? Bene, aggiungi ad esso, ad inizio file, la stringa che ti ho postato.

    Forse non ci intendiamo su "css esterno". Esso consiste nel creare un file di testo puro - con estensione ".css" - in cui inserire tutto il codice del foglio di stile (tag <style> escluso: esso fa parte del markup) e poi linkare tale file nel documento tramite il seguente codice (da posizionare nell'elemento HEAD della pagina):
    codice:
    <link href="URL/file.css" type="text/css" rel="stylesheet" />

  9. #9
    grazie
    si, so perfettamente cosa è un css esterno, come detto li sto usando... mi sono spiegato male io, comunque ora sei stato chiaro, ho risolto

    grazie
    O porti una soluzione, o fai parte del problema

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.