Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default CSS on the Browse...

    How do you apply CSS for the browse...
    How could this hapen to meeeeeeeeeeeeeee?lol.

  2. #2
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    I think its something like this.
    HTML Code:
    <!--[if lt IE 8]>
    <link rel="stylesheet" href="internetexplorer8.css" type="text/css" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" href="internetexplorer7.css" type="text/css" /> 
    <![endif]-->

  3. #3
    Join Date
    Sep 2007
    Location
    USA
    Posts
    474
    Tokens
    0

    Default

    pm --ss-- he knows the php one
    Post Meter
    ______________________________________________
    400 450 500 550 600 650 700 750 800 850 900-1k
    Green=Done | Orange=Almost | Red=Not Done
    ______________________________________________
    Habbo fury Coming Soon!
    My Img tag has ran away

  4. #4
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Jack..thats called distinguishing between browsers and using different css for different browsers....
    How could this hapen to meeeeeeeeeeeeeee?lol.

  5. #5
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Reconix View Post
    Jack..thats called distinguishing between browsers and using different css for different browsers....
    Ohh, I thought you just missed the r off

    If you mean where you can select which css to use:

    javascript.js
    HTML Code:
    function setActiveStyleSheet(title)
    
    {
    
        var i, a, main;
    
        for(i=0; (a = document.getElementsByTagName("link")[i]); i++)
    
        {
    
            if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title"))
    
            {
    
                a.disabled = true;
    
                if(a.getAttribute("title") == title) a.disabled = false;
    
            }
    
        }
    
    }
    
    
    
    function getActiveStyleSheet()
    
    {
    
        var i, a;
    
        for(i=0; (a = document.getElementsByTagName("link")[i]); i++)
    
        {
    
            if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
    
        }
    
        return null;
    
    }
    
    
    
    function getPreferredStyleSheet()
    
    {
    
        var i, a;
    
        for(i=0; (a = document.getElementsByTagName("link")[i]); i++)
    
        {
    
            if(a.getAttribute("rel").indexOf("style") != -1
    
            && a.getAttribute("rel").indexOf("alt") == -1
    
            && a.getAttribute("title")
    
            ) return a.getAttribute("title");
    
        }
    
        return null;
    
    }
    
    
    
    function createCookie(name,value,days)
    
    {
    
        if (days)
    
        {
    
            var date = new Date();
    
            date.setTime(date.getTime()+(days*24*60*60*1000));
    
            var expires = "; expires="+date.toGMTString();
    
        }
    
        else expires = "";
    
        document.cookie = name+"="+value+expires+"; path=/";
    
    }
    
    
    
    function readCookie(name)
    
    {
    
        var nameEQ = name + "=";
    
        var ca = document.cookie.split(';');
    
        for(var i=0;i < ca.length;i++)
    
        {
    
            var c = ca[i];
    
            while (c.charAt(0)==' ') c = c.substring(1,c.length);
    
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    
        }
    
        return null;
    
    }
    
    
    
    window.onload = function(e)
    
    {
    
        var cookie = readCookie("style");
    
        var title = cookie ? cookie : getPreferredStyleSheet();
    
        setActiveStyleSheet(title);
    
    }
    
    
    
    window.onunload = function(e)
    
    {
    
        var title = getActiveStyleSheet();
    
        createCookie("style", title, 365);
    
    }
    
    
    
    var cookie = readCookie("style");
    
    var title = cookie ? cookie : getPreferredStyleSheet();
    
    setActiveStyleSheet(title);
    page.php
    HTML Code:
    <head>
    <style type="text/css">@import("default.css");</style>
    <link href="default.css" rel="stylesheet" type="text/css" title="default">
    <link href="altcss.css" rel="alternate stylesheet" type="text/css" title="altcss">
    <script type="text/javascript" src="javascript.js"></script>
    </head>
    
    <body>
    <a onclick="setActiveStyleSheet('default');">Default</a><br />
    <a onclick="setActiveStyleSheet('altcss');">Alt Css</a><br />
    </body>
    Credit to Kristall Panel
    Last edited by Moh; 05-03-2008 at 02:15 PM.

  6. #6
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    CSS:
    Code:
    input.browse{
       color:#050;
       font-family:'trebuchet ms',helvetica,sans-serif;
       font-size:small;
       font-weight:bold;}
    Button:
    HTML Code:
    <input type="button" value="browse" class="browse" />

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Oh, you could of said browse button

  8. #8
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    He means the browse button, where you use:

    Code:
    <input type="file" />
    Im not sure to be honest.

  9. #9
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Yes, yes I do blob, colin that is for a submit button ;/.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  10. #10
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    Give me the code for your Browse Button it's basically the same.
    <input type="file" value="browse" class="browse" />
    Last edited by Colin-Roberts; 05-03-2008 at 10:12 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •