We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11041
    • 82 Posts
    Again I may have missed something here but I do not seem to be able to get this to function right.

    Here is the part of the css file affected;
    #left {
    	float: left;
    	width: 19%;
    	/* border-right: 1px solid #000000; */
    	margin-top: 5px;
    }
    #left h1 {
    	font-size: 14px;
    	text-align: center;
    	padding-left: 2%;
    	padding-top: 0px;
    	padding-bottom: 3px;
    }
    #left h2 {
    	font-size: 12px;
    	text-align: center;
    	padding-left: 2%;
    	padding-top: 0px;
    	padding-bottom: 3px;
    }
    #left p {
    	font-size: 10px;
    	padding: 5px;
    }
    #left p.csSpanClass {
    	font-size: 10px;
    	padding: 5px;
    }
    #left csSpanClass {
    	font-size: 10px;
    	padding: 5px;
    }


    Nothing seems to work and ive tried using the comma instead of the full stop as per your example above.
      • 5811
      • 1,717 Posts
      The full style of the text before the select drop down menu is:
      form #csFormId label span .csSpanClass
      So, if as I understand left is a left part of your body, changes:
      #left p {
      	font-size: 10px;
      	padding: 5px;
      } 
      by
      #left p, #left #csFormId .csSpanClass {
      	font-size: 10px;
      	padding: 5px;
      }

      Remove the other .csSpanClass style definition to avoid css conflicts.
        • 11041
        • 82 Posts
        Thats cracked it smiley

        Many thanks for that.

        Now to tackle some of the other items im looking at and having problems with lol smiley

        Many thanks again,

        Tom.
          • 5811
          • 1,717 Posts
          The version 0.5 of CssSwitcher is now available in the repository
            • 3143
            • 46 Posts
            Hello, I have a problem with CssSwitcher,
            
            My style folder is http://mysite.com/styles/
            
            This is in my template :
            
            <head>
            ...[!cssSwitcher? &display=`0` &csspath=`http://mysite.com/styles/`!]...
            </head>
            <body>
            ...[!cssSwitcher? &display=`select` &csspath=`styles/` &defaultcss=`default` &parsefolder=`1` !]
            ...<br /></body><br />


            This is snippet.cssSwitcher.inc.php :
            ...define('CS_CSSPATH','http://mysite.com/styles/'); ...
            


            Can someone please help ?
              • 5811
              • 1,717 Posts
              Why do you redefine &csspath in the 2nd cssSwitcher call ?
              You could define it in the includes/snippet.cssSwitcher.inc.php file or when you use display=0 to create the link with the css file (in that case this overwrite the definition of the include file).
              But in the third call &csspath=`styles/` overwrite again the path to css.
              Open the source code of your page and look at the link to css. Is it correct ?

              Is Bepobepo the same guy that French Fries ? If yes, it’s not necessary to post thread twice.
                • 10152
                • 156 Posts
                Re-hello,

                yes I am french fries = bépobépo, sorry for posting twice. All apologies for that, but I saw that only a few people read my topic in this subforum so i decided to post another topic in the general support forum so that it is read by more people. I am at work now and can’t remember the password for bépobépo (and no access to my mailbox from here) that’s why i have two aliases.


                For information, I use CssSwitcher V0.5

                Thanks for help, I try right now

                  • 3143
                  • 46 Posts
                  PHP 4.3.9
                  Mysql 3.23.58
                  ModX 9.6.2
                  CssSwitcher 0.5

                  I don’t see the switch in html when display is "select" or "htmllist" or "selectb".
                  When display is set to ’0’ I see in the html the link rel="stylesheet".


                  Thanks for reading.
                    • 5811
                    • 1,717 Posts
                    Salut Bépobépo,

                    Sorry for this delayed response, but I was a bit buzy with my job and with ajaxSearch this last time.
                    I don’t see the switch in html when display is "select" or "htmllist" or "selectb".
                    How is defined your switcher in your css file.
                    For instance hereafter is the css file for the css selector of the AjaxSearch demo site:
                    /* Css switcher */
                    #csFormId {
                      margin-top: 15px;
                    }
                    
                    #csFormId .csSpanClass{
                      display: block;
                    }
                    
                    #csFormId .csSelectClass {
                      font-size: 0.9em;
                      width: 12em;
                      margin: 2px 0;
                      padding: 1px 0;
                      background: #6F9303;
                      color: #fff;
                    }
                    
                    #csInputId{
                    	height: 2em;
                    	background: #6F9303;
                    	font-size: 0.9em;
                    	font-weight: bold;
                    	color: #FFFFFF;
                    }


                    which is coherent with the select template:
                    <form id="[+cs.formId+]" action="[+cs.formAction+]" method="post">
                      <label for="[+cs.labelFor+]">
                        <span class="[+cs.spanClass+]">[+cs.spanText+]</span>
                      </label>
                      <select class="[+cs.selectClass+]" name="[+cs.selectName+]" onChange="[+cs.gotourl+]">
                        [+cs.selectOptions+]
                      </select>
                    </form>
                      • 3143
                      • 46 Posts
                      Thanks for replying Coroico,

                      the problem has solved itself when cleaning up my ressources. I think I deleted something and that made the switch display. I can’t explain how i did to get it working, sorry.

                      CssSwitcher is now working and I enjoy it. After some days of experiencing the snippet I think there is a problems with it : the pages are accessible under several urls, for example my home page :

                      http://mysite.fr/
                      http://mysite.fr/page-daccueil&change_style=1&style=gris
                      http://mysite.fr/page-daccueil&change_style=1&style=blanc
                      http://mysite.fr/page-daccueil&change_style=1&style=bleu

                      That is not good for search engines, I will get a "duplicate content" for all my pages, won’t I ?