How do you apply CSS for the browse...![]()

How do you apply CSS for the browse...![]()
How could this hapen to meeeeeeeeeeeeeee?lol.
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]-->
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
Jack..thats called distinguishing between browsers and using different css for different browsers....
How could this hapen to meeeeeeeeeeeeeee?lol.
Ohh, I thought you just missed the r off
If you mean where you can select which css to use:
javascript.js
page.phpHTML 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);
Credit to Kristall PanelHTML 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>
Last edited by Moh; 05-03-2008 at 02:15 PM.
CSS:
Button:Code:input.browse{ color:#050; font-family:'trebuchet ms',helvetica,sans-serif; font-size:small; font-weight:bold;}
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:.:.
Oh, you could of said browse button![]()
He means the browse button, where you use:
Im not sure to be honest.Code:<input type="file" />
Yes, yes I do blob, colin that is for a submit button ;/.
How could this hapen to meeeeeeeeeeeeeee?lol.
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:.:.
Want to hide these adverts? Register an account for free!