Tuesday, August 11, 2009
Generate and check regular expressions, fast and for free
Monday, July 27, 2009
IE7 Vs IE8... Compatibility View
I have just been asked to fix a margin or padding issue that only appears in IE8, however with 'Compatibility View' set to 'On' the issue is resolved. There should be no incompatibilities between their own products unless they are going to follow the increasingly accepted standards. Then why not fix the older browsers using the update service and be done with the incompatibilities.
With IE6's Product Lifecycle about to expire and HTML5 on the horizon I personally felt that the web was about to get even bigger, almost a true start the web 2.0 ethos. But there is always something that isn't cross browser, or needs tweaking which just slows down development.
Would it not be better to gather up all the good bits and best practices, then build browser around one set of rules. The browser war can then just be down to the user experience, available extensions and scope for development.
The world can be better if we worked together!
Wednesday, July 22, 2009
Windows 7 is it just a con?
Moving the magento installation up and down folders...
See http://www.magentocommerce.com/boards/viewthread/13826/P15/ for more information but I found that using the following in the SSH terminal allowed the domain to copied up or down the folder tree on the server
cp -fR /www/vhtdocs/folder1/magento/* /www/vhtdocs/folder1/
This make a copy of everything everything apart from the .htaccess file, in the folder above (use your own logic to flip the folder names to copy into another folder instead of out-from) which takes a few seconds to FTP down then back up, the original post regarding shifting folders doesn't mention that the .htaccess file lists a BASEHREF to the wrong folder after moving so remember to alter that... but all told it went well.
The command is 'cp (copy) -f (overwriting) R (including sub-folders) /www/...(from)/*(everything) /www/...(to)
You can then keep the old installation as a backup if you like.
Monday, July 20, 2009
Putty BASH commands
Sunday, July 19, 2009
Saving last view using the URL anchor
Tuesday, May 12, 2009
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
/***** Selector Hacks ******/
* html #all { color: red }
/* IE 7 and below */*:first-child+html #all { color: #F60 } /*ORANGE*/
/* IE 7 and modern browsers */html>body #all { color: #FC0 } /*YELLOW*/
/* Modern browsers (not IE 7) */html>/**/body #all { color: #9C0 } /*GREEN*/
/* Opera 9.27 and below */html:first-child #all { color: #6CC } /*TIFFANY*/
/* Safari */html[xmlns*=""] body:last-child #all { color: #36F } /*BLUE*/
/*safari 3+, chrome 1+, opera9+, ff 3.5+ */body:nth-of-type(1) #all { color: #609 } /*PURPLE*/
/* safari 3+, chrome 1+, opera9+, ff 3.5+ */body:first-of-type #all { color: #600 } /*MAROON*/
/* saf3, chrome1+ */@media screen and (-webkit-min-device-pixel-ratio:0) {
#all { background: #FFDECE; border: 2px solid #ff0000 } /*??*/
}
/* ie6 and below */
#all { _color: #300 } /*NEARLY BLACK*//* ie7 and below */
#all { *color: #666 } /* or #color:#ffffff */ /*GREY*//* 'Modern Browsers' includes IE8, whether you agree or not.. :) */
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test CSS Document</title>
</head>
<div id="all">This is you browsers color...</div>
</body>
</html>
Monday, March 30, 2009
PHP Alternating row colours using a shorthand if statements
<table>
<tr>
<td class="<?=$class?>">Row 1</td>
</tr>
<tr>
<td class="<?=$class?>">Row 2</td>
</tr>
<tr>
<td class="<?=$class?>">Row 3</td>
</tr>
</table>
Friday, March 13, 2009
Change the date format using PHP
date("F",strtotime($month))
Simple
Wednesday, December 3, 2008
Screen and print css definitions
<link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />