Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11
  1. #1

    Non funziona il commento condizionale con IE

    Ciao a tutti.. ho fatto il mio sito..funziona perfettamente con FireFox (chiaramente!). poi quando vado ad inserire il commento condizionale per caricare un altro Css e visualizzare correttamente la pagina anche con IE non funziona.
    Ahh..nn mi funzionano nemmeno i link alle immagini.
    Questo è la mia home page:

    <html>
    <head>
    <title> Home </title>


    <link rel=stylesheet href="layuot_ff.css" type="text/css" />

    <!--[if IE]>

    <link rel=stylesheet href="layuot_ie.css" type="text/css" />


    <![endif]-->
    <script type="text/javascript">

    </script>
    </head>

    <body>

    <div id="container">

    <div id="intestazione">

    <a href="index.html">
    <div id="link_logo">

    [img]loghi/logo2.png[/img]

    </div>
    </a>


    <div id="spazio_logo"> </div>/*questo è per creare un blokko..nn sapevo cos'altro mettere*/


    </div>




    <div id="contenuto">


    <div id="colonna_sin">

    <a href="principale.html"> <div id="principale">

    [img]botton/botton_principale.jpg[/img]

    </div> </a>

    <a href="collaboratori.html"> <div id="collaboratori">

    [img]botton/botton_collaboratori.jpg[/img]

    </div> </a>

    <a href="attivita.html"> <div id="attivita">

    [img]botton/botton_attivita.jpg[/img]

    </div> </a>

    <a href="realizzazioni.html"> <div id="realizzazioni">

    [img]botton/botton_realizzazioni.jpg[/img]

    </div> </a>

    <a href="strumentazione.html"> <div id="strumentazione">

    [img]botton/botton_strumentazione.jpg[/img]

    </div> </a>



    ecc... nn scivo tutta pagina.

    Vi ringrazio per ogni eventuale risposta!

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Quando uno vede un codice di quel tipo, con una sintassi che si usava qualche decina di anni fa, ma che e` decisamente obsoleto da almeno 7 anni, non si meraviglia se le cose non funzionano.

    Anzitutto: manca il DOCTYPE, che indica al browser quale e` il linguaggio usato.

    Secondo: stai usando JS (javascript) per fare cose che i CSS fanno meglio. Il consiglio e` di eliminare TUTTI i JS, compreso gli eventi nei link e nei tag <img>.

    Terzo: Lo stile dentro il CSS per IE deve essere usato per correggere per IE alcuni attributi che si comportano in modo diverso: quindi andrebbe messo un CSS per i browser conformi, seguito da un CSS per IE dove sono solo gli aggiustamenti.

    Comunque non hai postato i due CSS, per cui non e` possibile rispondere alla domanda.

    PS: quando posti codice, usa gli appositi tag VB messi a disposizione del forum, altrimenti diventa difficile seguire il flusso: puoi usare il bottone # oppure il bottone PHP.
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  3. #3
    Si probbilmente nn è un codice totalmente accettabile..è che sn un principiante ed in pratica questo è il primo sito che provo a fare.

    cmq:

    -il DOCTYPE nn so bene ancora come impostarlo
    -nn saprai che codici utilizzare al posto del Java Script

    Questi sono i miei due CSS:



    codice:
    /* div {border: 1px solid none; } (all'inizio mi dava problemi di visualizzazione senza questi attributi */
    
    body {background-image:url(sfondi/sfondo_body.jpg);
    		backgroun-repeat:repeat;} /* decidere se mettere lo sfondo l body */
    
    #container {width:100%;
                	height:740px;}
    		
    
    #intestazione {background-image: url(sfondi/sfondo_intestazione.png);
    	background-repeat: no-repeat;
    		width:800px;
    		height:135px;
    		margin:auto;
    		}
    
    #link_logo {
    		width:152px;
    		height:99px; 
    		position:relative;
    		top:27px;
    		left:16px;
    		float:left;}
    
    #link_logo img{color:transparent;
    		text-decoration:none;}
    
    #spazio_logo {display: inline;}
    
    
    
    #contenuto {background-image: url(sfondi/sfondo_contenuto_grande.jpg);
    		background-repeat: repeat-x;
    		width:800px;
    		height:590px;
    		margin:auto;
    		margin-top:5px;}
    
    
    
    
    #colonna_sin {width:170px;
    		height:350px;
    		display:inline;
    		float:left; 
    		margin:2px;
    		border-right:1px solid gray;}
    
    #colonna_sin div {margin:3px;
    			margin-top:25px;
    			margin-bottom:10px;
    			width:150px;
    			height:20px;}
    
    
    
    #principale img{color:transparent;
    		border:0px}
    
    #collaboratori img{color:transparent;
    			border:0px}
    
    #attivita img{color:transparent;
    		border:0px}
    
    #realizzazioni img{color:transparent;
    			border:0px}
    
    #strumentazione img{color:transparent;
    			border:0px}
    
    #foto img{color:transparent;
    		border:0px}
    
    #rendering img{color:transparent;
    		border:0px}
    
    
    
    a:hover{color:transparent;}
    
    
    
    
    
    #main{background-image: url(sfondi/sfondo_main.jpg);
    	background-repeat: no-repeat; 
    	width:615px;
    	height:500px;
    	float:right;
    	margin:2px;
    	position:relative;
    	left:-5px;
    	overflow:scroll;
    	margin-top:2px;} 
    
    #main_home{background-image: url(sfondi/sfondo_main.jpg);
    	background-repeat: no-repeat; 
    	width:615px;
    	height:500px;
    	float:right;
    	margin:2px;
    	position:relative;
    	left:-5px;
    	margin-top:2px;} 
    
    #main_home img{width:370px;
    		height:210px;
    		margin-left:50px;
    		margin-top:90px;} /* la Home ha un MAIN diverso*/
    
    
    
    #scarica_file{width:370px;
    		height:20px;
    		display:inline;
    		float:right;
    		position:relative;
    		left:3px;}
    
    #scarica_file a:hover{color:gray;}
    
    
    #scarica_file h4{font-size:15px; 
    		font-weight:normal;
    		margin-top:0px;
    		margin-left:7px;
    		margin-bottom:0px;}
    
    #main img{width:370px;
    		height:210px;
    		margin-left:50px;
    		margin-top:90px;}
    
    #contenuto h2 {font-family:helvetica,serif,verdana;
    		border-bottom:1px solid grey;
    		display:inline;
    		position:relative;
    		top:18px;
    		left:3px;
    		margin-bottom:20px;}
    
    #main h3{ margin-top:40px;}
    
    #main h4 {font-size:15px; 
    		font-weight:normal;
    		margin-top:-18px;
    		margin-left:7px;}
    
    #main h5 {font-size:14px; 
    		font-family:cursive; /* ancora da decidere il font-family*/
    		margin-top:-14px;
    		margin-bottom:18px;}
    
    #main h7 {font-size:16px;
    		font-weight:bold;
    		position:relative;
    		top:-19px;}
    
    h9 {font-size:16px;
    		font-weight:bold;}
    
    
    
    li{margin-bottom:-20px;}
    
    .margin_lista{margin-bottom:0px;}
    
    
    
    
    ul h6{position:relative;
    	top:-23px;
    	margin:1px;
    	font-size:15px; 
    	font-weight:normal;}
    ul h4{position:relative;
    	left:-17px;}
    
    #main p {margin-top:50px;}
    
    
    #main li{margin-top:10px;
    	margin-right:11px;}
    
    
    
    #pie_di_pagina{ background-image: url(sfondi/pie_di_pagina2.jpg);
    		background-repeat: no-repeat;
    		width:820px;
    		height:50px;
    		margin:auto;
    		text-align:center;}
    
    #pie_di_pagina h5{font-size:12px; 
    			font-family:cursive;
    			margin:0px;
    			margin-right:16px;
    			display:inline;}
    
    #pie_di_pagina a:hover{color:gray;}


    codice:
     /*CSS Per Internet Explorer*/
    
    body {background-color:white;
    
    #intestazione {background-image: url(sfondi/sfondo_intestazione2.png);
    	background-repeat: no-repeat;
    		width:800px;
    		height:135px;
    		margin:auto;
    		}

    ti ringrazio per un eventual risposto..

    non riesco roprio a risolvere questo rpoblema di visualizzazione.

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Ho visto alcuni errori di sintassi: ti conviene passare dai valdatori, forse correggendo quelli risolvi.

    -il DOCTYPE nn so bene ancora come impostarlo
    Allora prova con la DTD XHTML 1.0 strict: in tal modo risolvi in partenza un buon numero di problemi con IE6 ed alcuni di IE7. Pero` anche la sintassi HTML e CSS deve essere poi adeguata.


    -nn saprai che codici utilizzare al posto del Java Script
    Stai gia` usando a:hover; i JS che usi li puoi sostituire con tali pseudoclassi.
    Ma fatti un giro nelle guide (tutorial) di XHTML e CSS: e` un piccolo investimento di tempo, che ti fa guadagnare molto tempo nello sviluppo. Le guide di HTML.it non son affatto male.


    E nel forum c'e` un thread chiamato "link utili": sono stati messi i link a numerosi esempi e pagine che possono essere veramente di aiuto.
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  5. #5
    Ti ringrazio della disponibilità.

    Ho risolto in parte.
    Con il DOCTYPE mi si è allineato tutto anche con IE
    ps. io ho usato questo di doctype
    codice:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/html4/strict.dtd>
    va bene così vero?


    poi ho sustituito il Java Script con A:HOVER solamente non me li riconosce con IE è normale?

    E inoltre non mi riconosce cmq l'altro Css con i Commenti Condizionali e ho dovuto scrivere il codice in un css interno con:
    codice:
    <style type="text/css">  ..codice.. </style>
    cmq ho sicuramente molte..forse troppe cose da imparare ed infatti sto seguendo varie guide pian piano ma intanto volevo mettere in pratica qualcosa.

  6. #6
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Il DOCTYPE va bene, ma perche` sia riconosciuto anche da IE deve essere la prima cosa che appare nel file (quindi niente prologo XML).

    A:HOVER non credo esista come selettore nei CSS, anche se qualche browser lo capisce come se fosse a:hover (scritto in minuscolo !!)

    Il CSS che avevi pubblicato mancava di una parentesi graffa, che ne impediva l'interpretazione.
    Per questo ti avevo consigliato un passaggio dai validatori:
    validatore HTML
    validatore CSS
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  7. #7
    Sto provando con i validatori ma nn li capisco bene.

    Per l'html mi da questi errori:

    Potential Issues The following missing or conflicting information caused the validator to perform guesswork prior to validation. If the guess or fallback is incorrect, it may make validation results entirely incoherent. It is highly recommended to check these potential issues, and, if necessary, fix them and re-validate the document.

    1. Warning No Character Encoding Found! Falling back to UTF-8. None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents. Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.

    Validation Output: 3 Errors

    Line 2, Column 0: "http:" is not a reserved name.

    http://www.w3.org/TR/html4/strict.dtd>

    Line 2, Column 0: cannot continue because of previous errors.

    http://www.w3.org/TR/html4/strict.dtd>

    Line 2, Column 1: XML Parsing Error: SystemLiteral " or ' expected.

    http://www.w3.org/TR/html4/strict.dtd>


    e questi due per il CSS

    Errori (2) URI : file://localhost/layuot.css

    4 - body La proprietà backgroun-repeat non esiste : repeat

    132 - a:hover Numero non valido : color transparent non è un valore per color : transparent

  8. #8
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Il DOCTYPE contiene un erorre di sintassi, mancano le virgolette. Vedi ad esempio la pagina http://w3schools.com/tags/tag_doctype.asp

    Ti manca di definire quale charset usi: puoi inserirlo in un meta, e puoi usare UTF-8, se non ne conosci altri: potrebbe andare bene per l'italiano

    Poi la validazione si ferma, perche` l'errore di virgolette nel DOCTYPE gli impedisce di capire il resto


    Per il CSS, era un errore che avevo notato
    backgroun non e` un attributo, manca la d finale

    per il color transparent, forse hai dimenticato i duepunti tra il color e il transparent
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  9. #9
    Caspita non sto capendo tanto bene.

    Per l'html ho cambiato il DOCTYPE e l'ho scritto cosi
    codice:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    però adesso mi da più errori:

    1. No Character Encoding Found! Falling back to UTF-8. None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents. Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document. ↑ Top Validation Output: 9 Errors

    1. Warning Line 14, Column 55: NET-enabling start-tag requires SHORTTAG YES. <link rel=stylesheet href="layuot.css" type="text/css" /> ✉ The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

    2. Error Line 14, Column 56: character data is not allowed here. <link rel=stylesheet href="layuot.css" type="text/css" /> ✉ You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include: * putting text directly in the body of the document without wrapping it in a container element (such as a

    aragraph</p>), or * forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or * using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

    3. Error Line 126, Column 20: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <div id="link_logo"> ✉ 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>").


    4. Error Line 144, Column 47: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="principale.html"> <div id="principale"> ✉ 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>").

    5. Error Line 149, Column 53: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="collaboratori.html"> <div id="collaboratori"> ✉ 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>").


    6. Error Line 154, Column 43: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="attivita.html"> <div id="attivita"> ✉ 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>").

    7. Error Line 159, Column 53: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="realizzazioni.html"> <div id="realizzazioni"> ✉ 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>").


    8. Error Line 164, Column 55: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="strumentazione.html"> <div id="strumentazione"> ✉ 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>").


    9. Error Line 169, Column 35: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="foto.html"> <div id="foto"> ✉ 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>"). 10. Error Line 174, Column 45: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tag. <a href="rendering.html"> <div id="rendering"> ✉ 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>").


    Ti manca di definire quale charset usi: puoi inserirlo in un meta, e puoi usare UTF-8, se non ne conosci altri: potrebbe andare bene per l'italiano
    in quanto a questo non so proprioa che ti riferisci..non so come definire questo charset e come si inserisce il meta tag.


    il css va abbastanza bene mi da solamente l'errore :
    codice:
    132  	 a:hover  	 Numero non valido : color  transparent non è un valore per color :  transparent
    però il codice mi sembra scitto bene:
    codice:
    a:hover{color:transparent;}

    scusami se ti sto tartassando con questi problemi..

  10. #10
    ahh..

    IL mio sito è fatto solamente con html e CSS

    quindi al doctype devo mettere

    codice:
    DTD HTML 4.01 Transitional
    codice:
    DTD HTML 4.01 Frameset/
    O
    codice:
    DTD XHTML 1.0 Strict
    ?

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.