+ Reply to Thread
Results 1 to 7 of 7

Menù CSS e HTML su IE8

This is a discussion on Menù CSS e HTML su IE8 within the CSS | HTML forums, part of the HTML category; Ho creato un menù orizzontale in cima a tutte le pagine in html e css per il mio sito... (premetto ...

  1. #1
    Junior Member Settled In vale93kotor is on a distinguished road
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Menù CSS e HTML su IE8

    Ho creato un menù orizzontale in cima a tutte le pagine in html e css per il mio sito... (premetto di non essere pratico al 100%)

    Link My Simple Romance - News


    Il problema è che su Firefox,Opera,... funziona mentre su explorer non va...


    L'html lo trovate dalla sorgente...

    Il CSS del menù è
    Code:
            #menu{
            width:100%;
            background-color:#424242;
            }
            /*stile generale delle liste*/
            #menu ul{
            margin:0;
            padding:0;
            position: relative;
            height: 30px;
            width:100%;
            }
            /*stile generale delle sub liste*/
            #menu ul ul{
            position: absolute;
            top:30px;
            left: 0;
            visibility: hidden;
            }
            /*stile generale dei list item*/
            #menu li{
            list-style: none;
            float: left;
            padding:0 5px;
            background-color:#424242;
            }
            #menu ul, #menu li{
            background-color:#424242;
            }
            #menu ul ul, #menu li li{
            background-color:#4F4E49;
            }
            #menu ul ul ul, #menu li li li{
            background-color:#767676;
            }
            
            /*style generale dei link*/
            #menu a{
            display:block;
            float:left;
            padding:0 30px;
            text-decoration:none;
            text-align: center;
            line-height: 30px;    
            font-family: Verdana;
            font-size: 9px;
            font-weight: bold;
            }
            /*style generale dei link sullo stato hover*/
            #menu ul :hover > a, #menu ul a:hover{
            height:20px;
            border-top:5px solid #424242;
            border-bottom:5px solid #424242;
            line-height:20px;
            }
            #menu ul :hover > a.sub{
            height:25px;
            border-bottom:none;
            line-height:20px;
            }
            /*stile link primo livello*/
            #menu ul a{
            color:#FFFFFF;
            }        
            #menu ul :hover > a{
            background-color:#4F4E49;
            border-color:#424242;
            color:#FFAF3A;
            }     
            /*stile link secondo livello*/
            #menu ul ul a{
            color:#FFAF3A;
            }    
            #menu ul ul :hover > a{
            background-color:#767676;
            border-color: #4F4E49;
            color:#D65643;
            }    
            /*stile link terzo livello*/
            #menu ul ul ul a{
            color:#D65643;    
            }
            #menu ul ul ul :hover > a{
            background-color:#FFF;
            border-color:#767676;
            }    
            /*secondo livello visibile su hover del primo livello*/
            #menu ul li:hover ul, #menu ul a:hover ul{
            visibility:visible;
            }
            /*terzo livello invisibile su hover del primo livello*/
            #menu ul li:hover ul ul, #menu ul a:hover ul ul{
            visibility:hidden;
            }
            /*terzo livello visibile su hover del secondo livello*/
            #menu ul ul li:hover ul, #menu ul ul a:hover ul{
            visibility:visible;
            }
            /*style per Internet Explorer 6*/
            #menu table {
            position:absolute; 
            top:0; 
            left:0;
            width:100%;
            }
            #menu a:hover{
            height:20px;
            border-top:5px solid #424242;
            border-bottom:5px solid #424242;
            line-height:20px;
            }
    
    
            #menu ul a.sub:hover{
            height:25px;
            border-bottom:none;
            line-height:20px;
            }
            #menu ul a:hover{
            background-color:#4F4E49;
            border-color:#424242;
            color:#FFAF3A;
            } 
            #menu ul ul a:hover{
            background-color:#767676;
            border-color: #4F4E49;
            color:#D65643;
            }
            #menu ul ul ul a:hover{
            background-color:#FFF;
            border-color:#767676;
            }

  2. #2
    CSS.FlepStudio.org Moving My Stuff To The FlepStudio Onsitus is on a distinguished road Onsitus's Avatar
    Join Date
    Jul 2007
    Posts
    1,436
    Rep Power
    7

    Re: Menù CSS e HTML su IE8

    Ciao,

    visto che l'esempio originale funziona bene (Menu css gratuito - esempio 15) e che a prima vista non ci sono errori nel codice, direi che il problema sia causato del doctype iniziale sbagliato.

  3. #3
    Junior Member Settled In vale93kotor is on a distinguished road
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Re: Menù CSS e HTML su IE8

    A me il doctype sembra corretto...


    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="it">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="description" content="My Simple Romance - Tutto sui My Chemical Romance e i Simple Plan - Un sito aggiornato ogni giorno con un sacco di news, foto, video,lyrics,... sui MCR e i SP"> 
    <meta name="keywords" content="music, simple plan, my chemical romance, video, cd, news, rock, punk, dvd, forum, site, forumfree forumcommunity, the black parade, msr, 2009, venganza, gallery, bio, my simple romance"> 
    
    <link rel=stylesheet href="http://mysimpleromance.altervista.org/style.css" type="text/css"><title>My Simple Romance - News</title>
    
    
    
    
    
    
    
    
    </head>

    EDIT:Forse la codifica è in utf-8...vedo di modificare quella parte...

  4. #4
    Junior Member Settled In vale93kotor is on a distinguished road
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Re: Menù CSS e HTML su IE8

    Quote Originally Posted by vale93kotor View Post
    A me il doctype sembra corretto...
    EDIT:Forse la codifica è in utf-8...vedo di modificare quella parte...
    come non detto no.. è giusta

    HTML Code:
    charset=windows-1252

  5. #5
    CSS.FlepStudio.org Moving My Stuff To The FlepStudio Onsitus is on a distinguished road Onsitus's Avatar
    Join Date
    Jul 2007
    Posts
    1,436
    Rep Power
    7

    Re: Menù CSS e HTML su IE8

    Il doctype corretto per html 4.01 è:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    Se no, prova con xhtml strict (come nell'esempio) o transitional.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Con il doctype sbagliato, IE va in modo standard e interpreta il css come per IE4!
    Last edited by Onsitus; 03-06-10 at 17:36.

  6. #6
    Junior Member Settled In vale93kotor is on a distinguished road
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Re: Menù CSS e HTML su IE8

    Era per il doctype... l'ho lasciato in HTML transitional (perchè non ho voglia di rimodificare tutto per renderlo validato per l'xhtml...)


    Grazie mille davvero!!

  7. #7
    Junior Member Settled In PatenNali is on a distinguished road
    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0

    Re: Menù CSS e HTML su IE8

    Con il doctype sbagliato, IE va in modo standard e interpreta il css come per IE4!

    wholesale artificial grass

+ Reply to Thread

Similar Threads

  1. XML e HTML
    By domdurakov in forum Actionscript 3.0 avanzato
    Replies: 1
    Last Post: 25-02-10, 08:04
  2. Adding Sub-sub menu (3rd level) to Horizontal Menu
    By caveDweller in forum Flash English
    Replies: 0
    Last Post: 25-10-09, 16:26
  3. tab menu that opens html / remembers last tab position
    By etsutton in forum Flash English
    Replies: 1
    Last Post: 31-07-08, 06:21
  4. XML and HTML
    By Blusquare in forum CSS | HTML
    Replies: 14
    Last Post: 02-07-08, 17:26
  5. AIR su HTML
    By kikk in forum Actionscript 3.0 base
    Replies: 2
    Last Post: 01-04-08, 12:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts