Jump to content

Genert

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Genert

  • Rank
    Newbie
  • Birthday 11/10/1996

Previous Fields

  • Languages
    jSON,PHP,HTML,CSS,JS,C,C++

Contact Methods

  • Website URL
    http://genert.impact.pri.ee/

Profile Information

  • Location
    Estonia,Tallinn
  • Interests
    Coding,graphic
  1. Hello. IE 9 has weird thing with border radiuses. Lets take a example: border-radius: 10px; It will not work in IE 9. Now you ask why, because it IS supported in IE 9. Well the problem is in common syntax mistake. The working code should look like this: border-radius: 10px 10px 10px 10px; IE 9 needs full values for border radius! I can't memorize where did I read that, but it was on a IE article, somewhere And don't forget this: <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  2. Oh yeah,forgot to add that you can add multiple values. img { transition:width 1s,height 1s; -moz-transition:width 1s,height 1s; -webkit-transition:width 1s,height 1s; -o-transition:width 1s,height 1s;}img:hover { width: 100%; height: 100%;}
  3. CSS3 has great way to do it. It's called transition. Here is a example how it would look: img { transition:width 1s; -moz-transition:width 1s; -webkit-transition:width 1s; -o-transition:width 1s;} img:hover { width: 100%;} Just remember! transition: [goal] [time]; Goal can be anything in CSS,background-color,color,height,float....etc. Time is in seconds! And the goal can't be in same CSS element,it must be in :after,:hover..etc.
  4. He pointed at you should use IE css for not showing nothing. Here is a javascript snippet,but it into HTML head! <script type="text/javascript">var BrowserDetect = {init: function () { this.browser = this.searchString(this.dataBrowser) || ""; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || ""; this.OS = this.searchString(this.dataOS) || "";},searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; }},searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser: [ { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, { string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "Version" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.vendor, subString: "Camino", identity: "Camino" }, { // for newer Netscapes (6+) string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" }],dataOS : [ { string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.userAgent, subString: "iPhone", identity: "iPhone/iPod" }, { string: navigator.platform, subString: "Linux", identity: "Linux" }]};BrowserDetect.init();var doWeSupport=false;if (BrowserDetect.browser == "Safari" && (BrowserDetect.version=="" || BrowserDetect.version>=3)) doWeSupport=true;if (BrowserDetect.browser == "Firefox" && (BrowserDetect.version=="" || BrowserDetect.version>=3)) doWeSupport=true;if (BrowserDetect.browser == "Mozilla" && (BrowserDetect.version=="" || BrowserDetect.version>=3)) doWeSupport=true;if (BrowserDetect.browser == "Opera" && (BrowserDetect.version=="" || BrowserDetect.version>=9)) doWeSupport=true;if (BrowserDetect.browser == "Explorer" && (BrowserDetect.version>=9)) doWeSupport=true;if (BrowserDetect.browser == "Chrome") doWeSupport=true;if (!doWeSupport) top.location='nobrowser.html';</script> So if client has IE version lower than 9,then he gets redirected to nobrowser.html Make a HTML called "nobrowser.html" with small CSS usage to inform clients that they have outdated browser.
  5. Genert

    switch statement

    I would do this in that way: while( true ) { switch( $x ) { // One number stuff comes here case 0: [do something]; break; default:... } if( $x > 92 ) { ... // Other stuff comes here...
  6. Yes,I got what you said,used it and didn't get any result. But then I looked at reset.css what I wrote and were using. And I totally forgot what I had written there: ul {list-style-type:none;padding:0;margin:0 0 1.5em 0;}ul li { vertical-align:top; padding:0 0 .5em 0; margin:0 0 0 10px; list-style-type:square; } ul ul { margin:.5em 0 -.5em 1em; padding:0; } That caused these spaces,after removing it and tweaking the padding,I got it right! Thanks dsonesuk for pointing at HTML,otherwise I could't find my way to reset.css This can be closed.
  7. Hello,I'm having an unusual problem with CSS. Here is a picture of a problem. I pointed the "arrows" to these unneeded spaces,there should be just an border together,not having a space. Here is a code: .h-wrapper ul { width: 97%; height: 60px; position: relative; float: left; left:18px; background-color: rgba(50,50,50,0.98); -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; -khtml-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; box-shadow: 0 0 10px rgba(201,150,48,0.75); -moz-box-shadow: 0 0 10px rgba(201,150,48,0.75); -webkit-box-shadow: 0 0 10px rgba(201,150,48,0.75);} .h-wrapper ul li { list-style-type: none; height: 50px; width: 100px; line-height:60px; float: left; text-align: center; border-right: 1px rgb(201, 150, 48 ) solid; border-left: 1px rgb(201,150,48) solid; padding: 5px 0; /* Fixes border cut */} .h-wrapper ul li:hover { background-color:rgba(201,150,48,0.75);} I tried margin,padding,everything,didn't work And the problem isn't at HTML,everything is OK there ^^
  8. I don't think so if the code is correct and developer has added a lot security scripts as he/she knows.As long the user doesn't know your file location..everything is okay.That's why I always use dynamic PHP pages include. $page = $_GET['page'];$pages = array('323242', '4214141', '8123919');if (!empty($page)) { if(in_array($page,$pages)) { $page .= '.php'; include($page); } else { echo 'Page not found. Return to <a href="index.php">index</a>'; }} else { include('323242.php');} And later I ill add .htacces rewrite rule to make url user friendlier.
×
×
  • Create New...