Multiple Style Sheet Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    Multiple Style Sheet Question

    I am running into a problem with a style sheet for my menu and the style sheet on my web page.

    The style sheet for the web page is over riding some of the items of my menu sheet.

    Is there any way i can stop this and exclude my menu from being styled by the web page sheet?
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    i guess your styling using html elements

    eg...

    Code:
    ul{
    float:left;
    }
    what you need to do is use classes and IDs

    Code:
    .myUnorderdList{
    float:left;
    }
    This is only a guess as you haven't included code for me to use to help diagnose.

    If this didn't work please include examples

    Comment

    • Stang02GT
      Recognized Expert Top Contributor
      • Jun 2007
      • 1206

      #3
      i apologize here is the code that styles my menu

      Code:
      .horizontalcssmenu ul{
      margin: 0;
      padding: 0;
      max-width: 200;
      list-style-type: none;
      }
      
      /*Top level list items*/
      .horizontalcssmenu ul li{
      position: relative;
      display: inline;
      float: left;
      }
      
      /*Top level menu link items style*/
      .horizontalcssmenu ul li a{
      display: block;
      width: 90px; /*Width of top level menu link items*/
      padding: 2px 8px;
      border: 1px solid #202020;
      border-left-width: 0;
      text-decoration: none;
      background: url(untitled.bmp) center center repeat-x;
      color: white;
      font: bold 10px Tahoma;
      
      }
      	
      /*2nd level menu*/
      .horizontalcssmenu ul li ul{
      left: 0;
      top: 0;
      position: absolute;
      display: block;
      visibility: hidden;
      z-index: 100;
      }
      
      /*2nd level menu list items*/
      .horizontalcssmenu ul li ul li{
      display: inline;
      float: none;
      }
      
      
      /* 2nd level menu links style */
      .horizontalcssmenu ul li ul li a{
      width: 130px; /*width of sub menu levels*/
      font-weight: normal;
      padding: 2px 5px;
      background: url(untitled1.bmp) center center repeat-x;
      border-width: 0 1px 1px 1px;
      }
      
      .horizontalcssmenu ul li a:hover{
      background: url(untitled1.bmp) center center repeat-x;
      }
      
      .horizontalcssmenu ul li ul li a:hover{
      background: url(untitled2.bmp) center center repeat-x;
      }
      
      .horizontalcssmenu .arrowdiv{
      position: absolute;
      right: 0;
      background: transparent url(menuarrow.gif) no-repeat center left;
      }
      
      * html p#iepara{ 
      padding-top: 1em;
      }
      	
      /*3rd level menu*/
      .horizontalcssmenu ul li ul li ul{
      left: 0;
      top: 0;
      border-top: 0px solid #202020;
      position: absolute;
      left: 70px; /*this is the offset for the sub sub-menu to allow the sub-menu to be seen*/
      display: block;
      visibility: hidden;
      z-index: inherit;
      }
      
      /*3rd  menu list items*/
      .horizontalcssmenu ul li ul li ul li{
      display: inherit;
      float: right;
      }
      
      
      /*3rd  menu links style */
      .horizontalcssmenu ul li ul li ul li a{
      width:120px; /*width of sub menu levels*/
      display:block;
      font-weight: normal;
      padding: 2px 2px;
      background:  url(untitled.bmp) center center repeat-x;
      border-width: 0 1px 1px 1px;
      }

      and here is the code for style sheet for the page that the menu is on

      Code:
      A:link { color: blue; text-decoration: none }
      A:active { color: blue; text-decoration: none }
      A:visited { color: red; text-decoration: none }
      A:hover { color: #00CCFF; text-decoration: none }
      BODY    { font: normal 10pt Trebuchet MS; }
      P   { font: normal 10pt Trebuchet MS; }
      LI { margin-top: 0px; }
      TD  { font: normal 10pt Trebuchet MS; }
      .m1,.m2,.m3,.m3a,.m4,.m4a,.m5,.m6,.m7,.m8,.m9,.m10 {font-family: Trebuchet MS;}
      .m2,.m4,.m6,.m8,.m10 {font-weight:bold;}
      .m1,.m2  {font-size:10pt;}
      .m3a,.m4a {font-size:11pt;}
      .m3,.m4 {font-size:12pt;}
      .m5,.m6 {font-size:14pt;}
      .m7,.m8 {font-size:18pt;}
      .m9,.m10 {font-size:9pt;}
      .p8 {font: normal 8pt Trebuchet MS;}
      .p9 {font: normal 9pt Trebuchet MS;}
      
      
      
      
      BODY {OVERFLOW:scroll;OVERFLOW-X:auto;}
      .DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}

      Comment

      • Stang02GT
        Recognized Expert Top Contributor
        • Jun 2007
        • 1206

        #4
        My main problem lies in that the Web Page Css file treats all the menu items with drop downs as VISITED Links and makes them red. I need them to remain white at all times (User Request), but if i change the Web Page style sheet to Visited Links being white it fixes the problem with the menu items, but it creates the issue where all other links that were Visited are now white and unreadable.

        Comment

        • harshmaul
          Recognized Expert Contributor
          • Jul 2007
          • 490

          #5
          Best guess is that the achor tags are linking back to the same page. Therefore the href is referencing a page already visited.

          If you make sure the anchors that are comming up red AREN'T pointing at the current page.

          Many people do this while a sites in dev, if this isn't the case please post a link OR the complete code.

          Code:
          A:link { color: blue; text-decoration: none }
          A:active { color: blue; text-decoration: none }
          A:visited { color: red; text-decoration: none }
          A:hover { color: #00CCFF; text-decoration: none }

          Comment

          • Stang02GT
            Recognized Expert Top Contributor
            • Jun 2007
            • 1206

            #6
            The site is in DEV right now. And the anchor tags are all pointing to different pages, so im not really sure whats going on with it.

            Comment

            • just a feeling
              New Member
              • Aug 2007
              • 86

              #7
              I guess it's a CSS specifity problem, but I can't figure it out without the HTML markup. So post it plz.

              Comment

              • Stang02GT
                Recognized Expert Top Contributor
                • Jun 2007
                • 1206

                #8
                I seemed to have fixed the problem, here is what i did that fixed it.


                Code:
                #navigation A:link { color: blue; text-decoration: none }
                #navigation A:active { color: blue; text-decoration: none }
                #navigation A:visited { color: red; text-decoration: none }
                #navigation A:hover { color: #00CCFF; text-decoration: none }

                Comment

                Working...