3 replies [Last post]
chandanti
Offline
newbie
Mumbai
Last seen: 12 years 49 weeks ago
Mumbai
Joined: 2007-12-20
Posts: 2
Points: 0

The following code works well in Firefox but not in Internet Explorer.
The CS code is :

/* GLOBALHEADER */

#globalheader { width: 921px; height: 41px; margin: 18px auto; position: relative; z-index: 9998; }

#globalheader #globalnav { margin: 0; padding: 0; }

#globalheader #globalnav li { display: inline; }

#globalheader #globalnav li a { float: left; width: 153px; height: 0; padding-top: 41px; overflow: hidden; }

#globalheader #globalnav li a,

#globalheader #globalnav { background-image: url(http://rishijyotishsanstha.org/vedic_header1.jpg);_background-image: url(http://rishijyotishsanstha.org/vedic_header1.jpg); background-repeat: no-repeat; }

/* BUTTONS */

#globalheader #globalnav li#gn-consult a { background-position: 0 0; }

#globalheader #globalnav li#gn-consult a { background-position: -153px 0; }

#globalheader #globalnav li#gn-store a { background-position: -306px 0; }

#globalheader #globalnav li#gn-education a { background-position: -459px 0; }

#globalheader #globalnav li#gn-downloads a { background-position: -612px 0; }

#globalheader #globalnav li#gn-support a { background-position: -765px 0; }

/* OVER STATES */

#globalheader #globalnav li#gn-home a:hover { background-position: 0 -41px; }

#globalheader #globalnav li#gn-consult a:hover { background-position: -153px -41px; }

#globalheader #globalnav li#gn-store a:hover { background-position: -306px -41px; }

#globalheader #globalnav li#gn-education a:hover { background-position: -459px -41px; }

#globalheader #globalnav li#gn-downloads a:hover { background-position: -612px -41px; }
#globalheader #globalnav li#gn-support a:hover { background-position: -765px -41px; }

/* PRESSED STATES */

#globalheader #globalnav li#gn-home a:active { background-position: 0 -82px; }

#globalheader #globalnav li#gn-consult a:active { background-position: -153px -82px; }
#globalheader #globalnav li#gn-store a:active { background-position: -306px -82px; }

#globalheader #globalnav li#gn-education a:active { background-position: -459px -82px; }

#globalheader #globalnav li#gn-downloads a:active { background-position: -612px -82px; }

#globalheader #globalnav li#gn-support a:active { background-position: -765px -82px; }

/* ON STATES */

#globalheader.home #globalnav li#gn-home a:hover { background-position: 0 0; cursor: default; }

#globalheader.consult #globalnav li#gn-consult a { background-position: -153px -82px !important; }

#globalheader.store #globalnav li#gn-store a { background-position: -306px -82px !important; }

#globalheader.education #globalnav li#gn-education a { background-position: -459px -82px !important; }

#globalheader.downloads #globalnav li#gn-downloads a { background-position: -612px -82px !important; }

#globalheader.support #globalnav li#gn-support a { background-position: -765px -82px !important; }

The piece of HTML code is:


  • vedic Store

  • Vedic education

  • Vedic Downloads

  • Support



  • the output is at http://www.rishijyotishsanstha.org/main.html

    works well i Firefox but not in IE

    PLease help, where am I going wrong.

    gary.turner
    gary.turner's picture
    Offline
    Moderator
    Dallas
    Last seen: 9 hours 31 sec ago
    Dallas
    Timezone: GMT-6
    Joined: 2004-06-25
    Posts: 9774
    Points: 3856

    Begin by using a complete

    Begin by using a complete and strict DTD. Otherwise, IE is in quirks or near standards mode. Neither follow the standards, making x-browser compatibility very difficult to achieve.

    There are sticky posts on each forum that you should be sure to read. Many of these basic issues are covered there.

    cheers,

    gary

    If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

    chandanti
    Offline
    newbie
    Mumbai
    Last seen: 12 years 49 weeks ago
    Mumbai
    Joined: 2007-12-20
    Posts: 2
    Points: 0

    Thank you

    Thanks a lot !

    This solved my problem .

    Thank you again !

    preston.lanier
    Offline
    newbie
    Washington, DC Los Angeles, CA
    Last seen: 12 years 10 weeks ago
    Washington, DC Los Angeles, CA
    Joined: 2008-09-07
    Posts: 1
    Points: 0

    Stuck on background image

    This comment has been moved here.