SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser's compatibility

    Hello Everyone,
    I am new to web design and i designed a website which is good with all browsers except the new Internet explorer 7.

    Can anyone advise me on what do to so that it will be compatible with the explorer 7. What happened is " The menu of my web pages should be showing only when you click it but because it is not compatible with the new explorer, it open up and display all hidden menu.

    Can you help pls.

  2. #2
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    St Petersburg, Russia
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, do you use DOCTYPE? As far as I understand, if you use DOCTYPE, most browsers will render the page according to document type specification, i.e. in a similar way. Otherwise, each browser will render the page as it likes. I use DOCTYPE and I can tell that I hadn't write a single additional line to make my site compatible with IE7, though I had some compatibility issues between IE6/7 and FireFox.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browsers' Compatibility

    Hello,
    This is the link. It problem with IE 7 only.

    http://www.gloryeduserve.com/

    Thanks.

  4. #4
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're doctype is incorrect, putting your page into "quirks mode". Use this one:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    In addition, learn to use the html and css validators. You have 50 html errors and a number of CSS errors; all need correcting.

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser's compatibility

    I have used your link to test on: www.gloryeduserve.com.about.htm

    Do check it pls. It hides other sub hiden menu. It does not look nice.


    Can this be the problem: Look at the menu.js code below:

    Code:
     
    
    
    
    MENU=m.length
    
    for (i=0; i < MENU; i++){
    
    
    // START WRITING TOP LEVEL MENUS
    
    
    document.write("<div style='position:absolute;"+ALIGN+":"+ADJ[i]+";top:"+MFT+";width:"+Top_Width[i]+"' onmouseover='o["+i+"].ShowMenu()' onmouseout='o["+i+"].HideMenu()'>")
    
    browser_version= parseInt(navigator.appVersion);
    browser_type = navigator.appName;
    if (browser_type == "Netscape") {
    document.write("<a class='menu_TOP' style='height:"+TMH+"; color:#"+TMC+"; background-image: url("+TMBI+"); background-color:#"+TMBC+"; font-size:"+TMFS+"pt; font-weight:"+TMFW+"; font-family: "+TMFF+"; "+spn+"' href='"+n[i]+"'>"+m[i]+"</a></div>")
    }
    else {
    
    document.write("<a class='menu_TOP' style='height:"+TMH+"; color:#"+TMC+"; background-image: url("+TMBI+"); background-color:#"+TMBC+"; font-size:"+TMFS+"pt; font-weight:"+TMFW+"; font-family: "+TMFF+"; "+spn+"' onmouseover=\"this.style.backgroundColor='#"+TMHBC+"';this.style.color='"+TMHC+"';this.style.backgroundImage='URL("+TMHBI+")'\"  onmouseout=\"this.style.backgroundColor='#"+TMBC+"';this.style.color='"+TMC+"';this.style.backgroundImage='URL("+TMBI+")'\" href='"+n[i]+"'>"+m[i]+"</a></div>")
    
    }
    
    }
    
    
    for (i=0; i < MENU; i++){
    Or this sub-menu


    Code:
    / START WRITING SUB MENUS
    
    
    document.write("<div id='SUB"+i+"' class='menu_DIV' style='position: absolute; "+ALIGN+":"+(ADJ[i]+SUBshift)+";top:"+(MFT+MO)+";width:"+Sub_Menu_Width[i]+";background-color:#"+SMBC+";' onmouseover='o["+i+"].ShowMenu()' onmouseout='o["+i+"].HideMenu()'>"+s[i]+"</div>")
    
    
    }
    
    
    
    function StartMenu()
    {
    
    var D6=window,Y7=document;
    function DETECT()
    {
    this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=Y7.getElementById?1:0;this.opera5=this.agent.indexOf("Opera 5")>-1;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;this.ie4=(Y7.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this.ie6;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0;this.ns4=(Y7.layers && !this.dom)?1:0;this.BWD=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);return this
    }
    BWD=new DETECT();z=0;b=0;
    spn="";
    if(BWD.opera5||BWD.ns6)
    {
    b=2
    };
    if(BWD.ie)
    {
    spn=" width: 100%"
    }else{
    z=6
    }
    
    } 
    
    
    function SubMenu()
    {
    
    document.write("<TABLE cellpadding='0' cellspacing='0' border='0' width='100%' BGCOLOR='#"+TMBC+"'><tr><td>");
    document.write("<img src='picts/spacer.gif' width='100%' height='"+TMH+"'><br>");
    document.write("</td></tr></table>");
    
    document.write("<div width='100%' style='height:"+TMH+";position:absolute;top:"+MFT+";width:100%;background-image: url("+TMBI+"); background-color:#"+TMBC+";z-level:-2'></div>")
    
    browser_version= parseInt(navigator.appVersion);
    browser_type = navigator.appName;
    if (browser_type == "Netscape") {
    l="<a class='menu_SUB' style='height:"+SMH+"; color:#"+SMC+"; background-color:#"+SMBC+"; font-size:"+SMFS+"pt; font-weight:"+SMFW+"; font-family: "+SMFF+";"+spn+"' href='";
    }
    else {
    l="<a class='menu_SUB' style='height:"+SMH+"; color:#"+SMC+"; background-color:#"+SMBC+"; font-size:"+SMFS+"pt; font-weight:"+SMFW+"; font-family: "+SMFF+";"+spn+"' onmouseover=\"this.style.backgroundColor='#"+SMHBC+"';this.style.color='"+SMHC+"'\"  onmouseout=\"this.style.backgroundColor='#"+SMBC+"';this.style.color='"+SMC+"'\" href='";
    }
    r="'>";
    c="</a>";
    
    
    m=new Array();n=new Array();s=new Array();Sub_Menu_Width=new Array();su=new Array();st=new Array();Top_Width=new Array();ADJ=new Array()
    
    }
    
    
    function lib_obj(obj,nest){nest=(!nest) ? "":'document.'+nest+'.';this.evnt=BWD.dom? document.getElementById(obj):BWD.ie4?document.all[obj]:BWD.ns4?eval(nest+"document.layers." +obj):0;this.css=BWD.dom||BWD.ie4?this.evnt.style:this.evnt;this.ref=BWD.dom||BWD.ie4?document:this.css.document;this.x=parseInt(this.css.top)||this.css.pixeltop||this.evnt.offsettop||0;this.y=parseInt(this.css.left)||this.css.pixelleft||this.evnt.offsetleft||0;return this}
    function lib_doc_size(){this.x=0;this.x2=BWD.ie && document.body.offsetWidth-20||innerWidth||0;this.y=0;this.y2=BWD.ie && document.body.offsetHeight-5||innerHeight||0;this.x50=this.x2/2;this.y50=this.y2/2;return this;}
    lib_obj.prototype.ShowMenu = function(){this.css.visibility="visible"}
    lib_obj.prototype.HideMenu = function(){this.css.visibility="hidden"}
    function libinit(){page=new lib_doc_size();o=new Array();for (i=0; i < MENU; i++){o[i]=new lib_obj('SUB'+i);o[i].HideMenu()}}
    libinit()
    Do give your suggestions pls.


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
  •