The Dot Product

Follow me on TwitterRSS Feeds

  • Home
  • About The Dot Product

When to use an img tag, when to use a CSS background image

Nov 3rd

Posted by Neil Craig in (X)HTML

3 comments

<Img> tag vs CSS background image…This has caused much confusion to many web-developers I have met – many more developers don’t care. So, when should you use an <img> and when should you use a CSS background image on your element?
The answer is surprisingly simple…In nearly all cases, use <img> tags for contextually important images More >

accesibility, background, background images, CSS, eyesight problems, image, Img, perfect eyesight, Screen, screen reader users, walks of life

Mobile Website design & development guidelines

Nov 3rd

Posted by Neil Craig in (X)HTML

1 comment

Like it or hate it, the Apple iPhone has ushered in the age of the “Smartphone” which in turn has delivered mobile web-browsing to the masses. The mobile browser, whilst now broadly quite capable (at least on leading platforms), has introduced a slightly different set of requirements in terms of design and development of Websites.

Many, many designers, developers and others have written articles on how to design and/or develop for the mobile browser. I am aiming to summarise what I have learnt from several sources alongside my experience an opinion in a (hopefully) relatively quick and simple way

Apple IPhone, browser, browser users, desktop, desktop browsers, google, Javascript, mobile, mobile browser, mobile device, mobile website, mobile website design, New York, Oxfordshire, Screen, sizing images, support, UK, USA, use, website

How to reduce web page download time in 4 (fairly) simple steps

Oct 1st

Posted by Neil Craig in (X)HTML

No comments

Web pages have generally become much more bulky in recent years. The trends for JavaScript-based functionality enhancements and the popularisation of digital photography have led to larger amounts of data being transferred (downloaded) per page and I can’t see a reversal of this happening any time soon.
If you’re using a mobile device such as an More >

acceptable quality, CSS, css images, css sprites, device, E.G. CNAMEs, E.G. HTML, E.G. Images, E.G. JavaScript, functionality enhancements, graphical content, http, IPhone, load, number, page, traditional advice, unnecessary data, Web

How to create a cross-platform network controlled jukebox system (using VLC)

Sep 13th

Posted by Neil Craig in General Web-Development

2 comments

A simple way of setting up a music system (jukebox-style) which can be remote-controlled via a web-browser interface over a computer network.

computer, control, control interface, left hand menu, Linux, linux computers, Mac, menu check, music, network, VLC, web browser interface

Solution: Javascript returns incorrect width or height of an element containing image(s) when page first loads

Aug 20th

Posted by Neil Craig in (X)HTML

9 comments

Recently, I’ve been doing quite a lot of JavaScript development, part of which involved equalising heights of a group of similar elements on the page. I thought this would be very simple and indeed it was but it threw up a JavaScript quirk which I have seen several times before. The solution is simple, but More >

browser, browser cache, browser stores, container element, container elements, correct dimensions, dimen, DOM, dom tree, element, height, image, Javascript, Mac, Mac OSX, meta data, modern browsers, opera, opera mac, page, parent container, quirk, tag attributes

wget: saving a file to a custom location

Aug 19th

Posted by Neil Craig in General Web-Development

1 comment

This will be a really quick post which will be obvious to unix sysadmin veterans but hopefully will be helpful to us mere mortals…
wget is a linux/*nix command line tool which can download files (including entire websites if options are set correctly) and at first glance, from looking at the wget man page you’d be More >

command line tool, custom location, directory, file, man, page, unix sysadmin, user1, wget, wget man

Mootools element.morph() example

Aug 17th

Posted by Neil Craig in General Web-Development

3 comments

A simple example of the time-saving element.morph() Mootools method which allows you to morph HTML elements from one property set to another.

container element, div, div id, element, HTML, html xmlns, link rel stylesheet, MooTools, morph, new element

Quick “how to”: ProFTPd chroot, speed up connections and enable passive connections

Aug 16th

Posted by Neil Craig in Sysadmin

1 comment

This post is a really quick “how to” – working with ProFTPd on Debian Linux and will explain how to chroot your FTP users, speed up connections and enable passive connections which can be very handy for those behind firewalls.
You’ll first need to locate your main ProFTPd config file which on my system is in More >

FTP, home, initial connection speed, initial connections, passive connections, ProFTPd, proftpd server, system, unix system users, USER

Mootools element.getChildren() Vs element.getElements() – What’s the difference?

Aug 6th

Posted by Neil Craig in General Web-Development

1 comment

A really quick post detailing the main differences between the very useful Mootools Javascript element.getChildren() and element.getElements() methods.

bit, child elements, DOM, element, element methods, first glance, fragment, function, fundamental difference, getChildren, item, Javascript, list, MooTools, one lt, situation, sub

CSS Basics: The difference between outline and border

Jul 26th

Posted by Neil Craig in CSS

3 comments

CSS outline and border are at a glance very similar but have a few important differences:

Outline is effectively overlaid over the top of the element it is applied to and therefore outline does not add to the element width whereas border does add to the element width
Outline (according to the official W3C specification at least) More >

border, CSS, css2 properties, element, element width, glance, internet explorer 7, outline, w3c specification, width

Internet Explorer 8, Chrome & Safari bug: Text in strong tags not bold

Jul 5th

Posted by Neil Craig in (X)HTML

6 comments

This’ll be a quick post. There is a very annoying bug in Internet Explorer 8 (not IE6 or IE7), Chrome and Safari whereby text inside a <strong> tag is not displayed in bold!I haven’t yet figured out exactly under which conditions this bug manifests itself so if you know, please send me a message via More >

annoying bug, bug, class, Explorer, global style, internet, internet explorer 8, parent element, strangest thing, text

Outlook 2007 & 2010 bug: Embedded images being cropped

Jul 2nd

Posted by Neil Craig in General Web-Development

8 comments

I’ve just been creating the HTML for an Email to be sent out on behalf of a client and have found what appears to be a bug in Outlook 2007 & 2010 (which use the MS Word rendering engine) when using tall images in HTML Emails.
My HTML Email was created from a JPEG designed by More >

Email, email clients, HTML, html email, html emails, nasty table, outlook, Photoshop, Solution, support background images

Email client rendering engines – useful information for testing HTML email layouts

Jun 21st

Posted by Neil Craig in (X)HTML

2 comments

As every web-developer knows, testing your Web pages on the myriad of popular Web browsers can often be a horrible experience…and if there’s one thing which is even worse than testing web pages in different browsers, it surely has to be testing HTML Email layout in multiple Email clients!

Apple Mail, Email, email client rendering engines, email clients, Engine, horrible experience, HTML, html emails, internet explorer web, layout problems, lotus notes, mail apps, Microsoft, microsoft office word, microsoft outlook, mozilla thunderbird, outlook, outlook 2007, outlook 2010, PC. So, rendering, testing, thing, Web, Word, yahoo mail

Tutorial: VHost config from SQL Database – Lighttpd an alternative to Apache

Jun 10th

Posted by Neil Craig in Apache

No comments

Lighttpd is an alternative to the very popular Apache web-server – I have just found out that Lighttpd can draw it’s vhost configuration from a MySQL Database which is definitely a one-up on Apache, at least as far as I know.

apache vhost, base functionality, example, file, Lenny, Lenny Virtual, lighttpd, linux distribution, mod, MySQL, Server, server modules, shell script, sql, Vhost, vhost config from mysql, vhost from mysql, web interface, web servers

Flushing your DNS cache on Mac OSX 10.4, 10.5 and 10.6

Jun 8th

Posted by Neil Craig in Apple

No comments

If like me, you have to transfer websites between servers from time to time and you use an Apple Mac, you’ll probably need to know how to flush your DNS on Mac OSX (flushing is the term used for removing of all records to force an update).
For all versions of OSX, the simplest way to More >

Apple Mac, dig, global options, lookupd, Mac, Mac OSX, Neil-Craigs-, org, query status, question section, showip, Terminal, thedotproduct, Tiger, www

Google to stop using MS windows?

Jun 1st

Posted by Neil Craig in Apple

No comments

I just read something very interesting on macrumors.com – It’s being reported that due to security concerns, Google employees will no longer use MS Windows and that Google is replacing most of their Windows machines with Apple Macs…Is it true? Who knows…Nothing would surprise me with Google, they make some very decisive and bold moves More >

Apple Macs, bold moves, com, google, security concerns, something, time, Windows, windows machines

A simple example of CSS sprites

May 25th

Posted by Neil Craig in (X)HTML

7 comments

CSS Sprites can help to reduce web page download times and delays caused by downloading of hover/rollover background images. This article walks through the basics with an example of how you can use CSS sprites in a graphical HTML menu.

anchor elements, background, background images, background url, CSS, css sprites, css sprites example, default styles, DOM, graphical menu, html markup, image, item, lt, menu, personal pet, relevant portion, span, sprite

An example of @font-face web-fonts from CSS3

May 5th

Posted by Neil Craig in CSS

2 comments

Web-fonts, for those who don’t know, are a method of using a custom font in your web page(s). Unlike the more traditional method of specifying the font using the CSS “font-family” (or the shorthand “font”) which relies on the user having the relevant font installed on their computer, web-fonts allow the developer to use fonts More >

caviar dreams, compatibility table, CSS, css rules, font, font module, method, page, Web-fonts

A simple example of navigator.geolocation.watchPosition()

Apr 27th

Posted by Neil Craig in General Web-Development

17 comments

As I mentioned in my previous post about the new/upcoming navigator.geolocation standard, I have been experimenting with Geo location on my IPhone so I thought I’d share some of that with you in case it helps anyone out.
My example is very simple and is intended to show how you can use the JavaScript navigator.geolocation.watchPosition() (the More >

accurate method, accurate readings, api spec, callback, example of navigator geolocation, function, Geo, geolocation, IPhone, javascript navigator, latitude and longitude, location, navigator, position, position id, post, reading, success, thetime

How to get an accurate Geo location from Apple IPhone using navigator.geolocation.watchPosition

Apr 27th

Posted by Neil Craig in General Web-Development

5 comments

Anyone who’s tried using navigator.geolocation on a fixed-line (i.e. not mobile) device will know that it’s not too useful, usually at home my location is given as New York, USA when in fact I am in Oxfordshire in the UK! So, I turned to my IPhone and had a bit of a hard time at first trying to get an accurate position reading from navigator.geolocation.getCurrentPosition(). My findings here refer to using JavaScript in Safari on Apple IPhone (IPhone 3G with OS 3.1.3 on O2’s GSM network in the UK).

accurate position, Apple IPhone, Geo, geolocation, getCurrentPosition, gsm network, IPhone, location, location navigator, location services, mobile device, navigator, New York, new york usa, Oxfordshire, reading, time, UK, USA, watchPosition

Quick how-to: (Sub)Domain forwarding Email in Qmail (with virtual domain support)

Apr 22nd

Posted by Neil Craig in Email

3 comments

A brief article describing how I set up Qmail (on Debian Etch) running virtual domains to forward Email to another Email server using a simple addition to a Qmail config file.

config, config files, domain, Email, email forwarding, incoming email, Lenny, Nice, preferred setup, Qmail, qmail domain forwarding, qmail email forwarding, Server, test domain, Vincent, virtual domain support

UPDATED: A simple method of transferring MySQL Database(s)/Tables between servers

Apr 15th

Posted by Neil Craig in General Web-Development

1 comment

We’ve recently been working on a Web-Server migration for a regular client at work, part of which involved transferring the MySQL Databases (or strictly the schemas) for each of their websites from their old Web-Server to the shiny new replacement. In doing this, I rediscovered a really handy method which really simplifies transferring MySQL data More >

bsd type, C DESTINATION, DATABASE, MySQL, MySQL database transfer, PASSWORD, Server, server migration, SOURCE, source web server, Transfer MySQL Database, Transfer MySQL Database between servers, unix bsd, unix pipe, USER

Mouseenter/Mouseleave native support in FireFox

Apr 7th

Posted by Neil Craig in FireFox

No comments

For quite a while now, i’ve been trying to get native support for mouseenter/mouseleave JavaScript events included in the Gecko engine used in FireFox and other Gecko-based Web Browsers via a feature request on mozilla bugzilla system (see my mouseenter/mouseleave feature request on bugzilla). Internet Explorer has led the way with native support for mouseenter/mouseleave More >

feature, gecko engine, hoping that someone, internet explorer, mouse cursor, mouseenter, mouseleave, request, style menus, support

Multibox – a Multimedia alternative to Lightbox/Slimbox for Mootools 1.2

Apr 6th

Posted by Neil Craig in General Web-Development

1 comment

Since the original Lightbox was released by Lokesh Dhakar many moons ago, we’ve all been fascinated with it’s JavaScript trickery. Those of us who are Web-Developers working with/for Design Agencies will no doubt be very familiar with many subsequent, similar JavaScripts such as Slimbox.
I’ve tried out a fair number of MooTools compatible Lightbox clones/improvements and More >

Javascript, Liam Smart, Lightbox, Lokesh, many moons, MooTools, Multibox, slimbox, trickery, web developers, widget

HTML5 input elements and their data formats

Mar 31st

Posted by Neil Craig in General Web-Development

1 comment

As a follow-up to my article on js5hf – an unobtrusive javascript method for converting text type inputs to HTML5 input types, I wanted to put together a simple example of the new HTML5 inputs to demonstrate the formats in which they output data. So…you can see my example of HTML5 input element data formats More >

element data, HTML, input, input element, input elements, input types, javascript method, number, output, String, type inputs, week
12»
  • Search

  • Recent articles

    • When to use an img tag, when to use a CSS background image
    • Mobile Website design & development guidelines
    • How to reduce web page download time in 4 (fairly) simple steps
    • How to create a cross-platform network controlled jukebox system (using VLC)
    • Solution: Javascript returns incorrect width or height of an element containing image(s) when page first loads
  • Article categories

    • (X)HTML (10)
    • Accessibility (1)
    • Adobe Flash (2)
    • Apache (2)
    • Apple (4)
    • Apple Safari (2)
    • Browser bugs (3)
    • CSS (7)
    • CSS Basics (1)
    • CSS3 (1)
    • Email (1)
    • email clients (1)
    • FireFox (2)
    • Gecko (1)
    • General Web-Development (26)
    • Geo location (3)
    • Google Chrome (2)
    • html emails (2)
    • HTML5 (5)
    • internet explorer (1)
    • IPhone (4)
    • Javascript (11)
    • lighttpd (2)
    • Mobile Device Development (5)
    • MooTools (3)
    • MySQL (2)
    • Qmail (1)
    • Sysadmin (6)
    • Web-fonts (1)
    • Website optimisation (1)
    • XUL (1)
  • Article Archive

    • November 2010 (2)
    • October 2010 (1)
    • September 2010 (1)
    • August 2010 (5)
    • July 2010 (3)
    • June 2010 (4)
    • May 2010 (2)
    • April 2010 (6)
    • March 2010 (7)
  • Pages

    • About The Dot Product
  • Tag cloud

    Apple IPhonebrowserclasscompatibility tablecompliant htmlCSSdivDOMelementEmailemail clientsFireFoxflashGeogoogleHTMLhtml markupimageinputinput elementinput elementsinput typesinternet explorer 8IPhoneJavascriptlocationMacMac OSXmethodMooToolsmovieMySQLnumberoutlookOxfordshirepageScreenServersupporttexttimeUKUSERWebx shockwave flash
  • Brothers from other mothers...external links

    • Are you ready for DNSSEC? coming May 5th 2010!DNNSEC will be introduced to the internets root DNS servers on May 5th 2010 – are you ready for it?
    • QuirksmodePeter Paul Koch’s personal Web-Development Blog – a must for serious Javascripters with an increasing focus on mobile development
    • Syntax highlighting in HTML textareas – this is seriously good!If you need to add syntax highlighting to your textarea for CSS, XHTML/HTML, JavaScript, SQL and many more languages, this is for you!
RSS Feeds Top