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

    Script menu css che fa casino col validator

    ecco il mio menu..

    codice:
     <STYLE type="text/css">
    .menutitle {
    	BORDER-RIGHT: #c0330e 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #c0330e 1px solid; PADDING-LEFT: 2px; FONT-WEIGHT: bold; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; BORDER-LEFT: #c0330e 1px solid; WIDTH: 140px; CURSOR: pointer; COLOR: #c0330e; PADDING-TOP: 2px; BORDER-BOTTOM: #c0330e 1px solid; BACKGROUND-COLOR: #F08700; TEXT-ALIGN: center
    }
    .submenu {
    	MARGIN-BOTTOM: 0.5em
    }
    </STYLE>
    
    <SCRIPT type=text/javascript>
    
    if (document.getElementById){
    document.write('<style type="text/css">\n')
    document.write('.submenu{display: none;}\n')
    document.write('</style>\n')
    }
    
    function SwitchMenu(obj){
    	if(document.getElementById){
    	var el = document.getElementById(obj);
    	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
    		if(el.style.display != "block"){
    			for (var i=0; i<ar.length; i++){
    				if (ar[i].className=="submenu")
    				ar[i].style.display = "none";
    			}
    			el.style.display = "block";
    		}else{
    			el.style.display = "none";
    		}
    	}
    }
    
    </SCRIPT>

    poi aggiungo delle div per costruire il menu...

    il validator mi bastona:

    codice:
     
    #
    
    Line 152, column 22: document type does not allow element "STYLE" here
    
    <STYLE type="text/css">
    
    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).
    
    ✉
    #
    
    Line 166, column 23: end tag for element "STYLE" which is not open
    
    document.write('</style>\n')
    
    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
    
    If this error occured in a script section of your document, you should probably read this FAQ entry.
    
    ✉
    #
    
    Line 174, column 28: character ";" not allowed in attribute specification list
    
    for (var i=0; i<ar.length; i++){
    
    ✉
    #
    
    Line 174, column 28: element "AR.LENGTH" undefined
    
    for (var i=0; i<ar.length; i++){
    
    You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element), or by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    
    ✉
    #
    
    Line 185, column 8: end tag for element "SCRIPT" which is not open
    
    </SCRIPT>
    
    ✉
    #
    
    Line 325, column 27: there is no attribute "HEIGHT"
    
    <table width="387" height="420" style="background-image:url(images/layout/sud.g
    
    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

    aiuto...

  2. #2
    ok...sono arrivato ad avere solo questi:

    #

    Line 152, column 22: document type does not allow element "STYLE" here

    <STYLE type="text/css">

    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).


    #

    Line 166, column 23: end tag for element "STYLE" which is not open

    document.write('</style>\n')

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.

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.