Author Archive

iOS tip: how to zoom on web pages that have disabled user zoom

As I’ve mentioned in posts like Beware of -webkit-text-size-adjust:none and Controlling text size in Safari for iOS without disabling user zoom, it is possible for web developers to prevent user zoom in Safari for iOS.

In many cases this won’t be a huge problem, either because the site/app uses a sensible text size to begin with or because the user has sharp eyes. But when you find yourself viewing a site or app that has too small text for you to read comfortably and has disabled user scaling in the browser, there is a trick that may help – the built-in Zoom function in iOS.

Read full post

Posted in , .

Copyright © Roger Johansson



Clipping text with CSS3 text-overflow

When you need to display an unknown amount of text in a constrained space you may need to somehow hide text that doesn’t fit. One way is to use overflow:hidden to quite brutally hide it.

Doing this works, and it works cross-browser, but it can be difficult for the user to realise that text has been hidden since there is no visual indication of it. A property from the editor’s draft of the CSS Basic User Interface Module Level 3 that can help improve the situation is text-overflow.

Read full post

Posted in .

Copyright © Roger Johansson



Installing the W3C Markup Validator on Mac OS X

For web developers it is often convenient to have local access to a markup validator. There are browser extensions like the excellent HTML Validator extension, but sometimes you want a standalone installation that can be used for batch testing or other tasks where a browser extension isn’t the best solution.

Several (many) years ago I posted a Quicklink about a document on Apple’s Developer site called Installing the W3C HTML Validator on Mac OS X, which obviously is useful for those of us who use Mac OS X. That document is still online, but the instructions there don’t seem to be quite up-to-date. Instead of following them, here’s what I did to get the W3C Markup Validator running on Mac OS X 10.6.

Read full post

Posted in , .

Copyright © Roger Johansson



Validate URL syntax with JavaScript

Something that I initially thought would be simple turned into hours of googling for solutions. The problem? I wanted to use JavaScript to check if a URL uses valid syntax.

What I ended up doing is use js-uri to parse the URLs I want to check and then use a couple of regular expressions to check the syntax of the URL parts it returns.

Where I’m using this I’m not particularly interested in checking that the domain exists or verifying that the URL is live – I just want to check that the path, query, and fragment parts do not use characters other than those described in RFC 3986.

Read full post

Posted in .



Apache with virtual hosts, PHP and SSI on Mac OS X 10.6

For me, an essential web development tool is Apache. Regardless of whether I’m working on something that will actually be deployed in an Apache environment or just prototyping something that will be built on some other platform, having Apache enabled and with support for virtual hosts, PHP, and SSI makes things so much easier.

All of these things come built-in with Mac OS X, which makes it a great web development platform. However, none of it is enabled by default, and there are some configuration changes I like to make. I find that when I set up a new Mac or explain to a colleague how to do it, I need to look up what to change and stuff like that. To make that a little bit easier I thought I’d write a post with step-by-step instructions for my own future reference.

Read full post

Posted in , .



  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress