I was working on a client’s website last week that involved using the JQuery animate method with scrollTop to scroll smoothly down the page. On PCs, in all major browsers, this was absolutely fine. But when I loaded the site up on the iPad and iPhone I found it was stuttering horribly as it scrolled. The trick was to avoid doing anything while the animation run. So recall that if you execute the following in...
Read MoreWhy I love SASS
SASS saves my sanity on a regular basis when I’m working with CSS. If you currently write all your stylesheets in raw CSS, then please, for your sanity, stop! At least read this post first… Do you find that your stylesheets have the following properties: Lots of reuses of a few colours, fonts, margins. Values that you calculated based on other values on the stylesheet (eg. the height of the header + the height of the nav is...
Read MoreLearning to code
When I’m discussing web development with people, one of the main questions I get asked is “where did you learn to code?”. I have two answers to this question, and they’re both true. If the discussion is focused on web development in particular, I usually answer that I’m self-taught. I taught myself PHP, MySQL, HTML, CSS, and JavaScript by opening up open source projects and seeing how they were made. If...
Read MoreWorking around a server sending incorrect MIME types
Sometimes, MIME types are important. In particular, if you’re trying to make an HTML5 video play in Internet Explorer, it will throw a hissy if the content-type specified in the header is incorrect. I recently experienced this problem on a shared hosting package, and, frustratingly, the server appeared to be configured to ignore my “AddType” declarations in the htaccess file. I already had my videos set up and working in...
Read More
Recent Comments