Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2004
    Messaggi
    231

    Problema: W3C CSS Validator Results

    il risultato è questo:

    To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.

    Warnings
    URI : file://localhost....
    Line : 48 (Level : 1) You have no color with your background-color : body
    Line : 48 (Level : 2) Redefinition of background-color : body
    questo è il body

    body {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background:#1ca1ed;
    background-color:#1ca1ed;
    text-align: justify;
    }
    Non ho capito cosa devo fare....ho provato in tutti i modi

  2. #2
    Questo pezzo non ha molto senso:

    codice:
    background:#1ca1ed;
    background-color:#1ca1ed;
    Dovresti usare semplicemente il secondo, altrimenti eseguiresti una sovrascrittura.

    Poi il validatore dice una cosa molto importante: prima di pensare al foglio di stile devi validare la struttura (X)HTML del documento; ti sei assicurato che passi la validazione?

  3. #3
    Utente di HTML.it
    Registrato dal
    Nov 2004
    Messaggi
    231
    Adesso mi porta questo
    Line : 47 (Level : 1) You have no color with your background-color : body
    Ho provato a validare l'html ma mi porta questo

    Result: Failed validation
    File: ....html
    Encoding:
    Doctype:

    Sorry, I am unable to validate this document because its content type is text/plain, which is not currently supported by this service.

    The Content-Type field is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html).

    That you received this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page.

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    La cosa piu` probabile e` che manchi il DOCTYPE o che sia in formato errato.
    Vedi ad esempio http://www.w3schools.com/tags/tag_doctype.asp per alcuni DOCTYPE validi
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  5. #5
    Utente di HTML.it L'avatar di span
    Registrato dal
    Jan 2004
    Messaggi
    1,644
    comunque questo warning:

    codice:
    Line : 47 (Level : 1) You have no color with your background-color : body
    penso si riferisca al fatto che non è abbligatorio che lo user agent imposti un color #000 al testo di default.

    quindi se imposti un colore di background ti consiglia di impostarlo anche al testo, così da garantire un adeguato contrasto, ad esempio.

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.