• I want to have my webcam open in a pop up instead of having it in the whole layout so the whole page doesn’t have to load all over again. I was wondering if there was a code to get the css to change depending on the theme that the visitor has active. I know for regular skinning of a site (non wordpress related) the code is like:

    <script type=”text/javascript” language=”javascript”>
    function GetCookie(name) {
    var startIndex = document.cookie.indexOf(name);
    if (startIndex != -1) {
    var endIndex = document.cookie.indexOf(“;”, startIndex);
    if (endIndex == -1) endIndex = document.cookie.length;
    return unescape(document.cookie.substring(startIndex+name.length+1, endIndex));
    } else {
    return null;
    }} var style = GetCookie(‘skin’);
    if (style==null) {style=1;}
    document.writeln(“<link rel=\”stylesheet\” href=\”https://www.x-chaos.net/skins/&#8221; + style + “/style.css\” type=\”text/css\” />”);
    </script>

    or something of that sort, that was off the top of my head. I’m still learning php and stuff so… HELP! Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Criminy – you don’t need a script for this. All you have to do is create a stylesheet for your popup stuff, and then link to it in the header of the file:

    <link rel="stylesheet" href="comment-styles.css" />

    That’s it.

    Thread Starter xchaos

    (@xchaos)

    I want the style sheet to change depending on the theme that the visitor is using

    Your ‘theme’ already includes it’s own stylesheet. Check the header.php.

    If you want the pop-up css to change for every theme, then add the theme-appropriate properties to the theme’s style.css file. Doodlebee’s recommendation is simpler, as I doubt there will be a different css requirement for every theme, but only you know that…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing the css in pop ups’ is closed to new replies.