Changing FCKeditor's background colour on focus

I've been working on a form which requires each element's background colour to change when it receives focus. This is fairly straightforward and just needs a simple JavaScript function to be called using the onfocus and onblur attributes on the form's elements to achieve the desired effect.

One of the textareas however, needed to have rich text capabilities so I decided to replace it with FCKeditor

Once I'd done this, I had to work out how to get FCKeditor to behave the same as the other form inputs.

Since the onfocus and onblur attributes can only be applied to the a, area, button, input, label, select and textarea elements I didn't appear to have anywhere to attach the attributes to.

Read all of “Changing FCKeditor's background colour on focus”

A cross-browser implementation of jCarousel Lite (non-circular)

I've been working with jQuery and Ganeshji Marwaha's jCarousel Lite to produce a non-circular dynamic galley using images pulled from a folder using the FSO (File System Object). The images are of different dimensions so I re-sized them on the fly and centered them horizontally and vertically in divs (to look like slides).

Read all of “A cross-browser implementation of jCarousel Lite (non-circular)”

Vertical and horizontal centring an image in a div

The problem: A client uploads images to the server which are auto-resized on-the-fly to fit inside 100px x 100px boxes. The resized images then need to be displayed vertically and horizontally centred in 120px x 120px divs like slides.

Horizontal centring in the slide is easy with CSS (text-align:center;) but vertical CSS centring is more problematic.

Read all of “Vertical and horizontal centring an image in a div”

Resizing images on the fly

The problem: A client uploads images to the server which could be either .jpg, .gif or .png files and will be of different dimensions.

They need to be displayed on the site no larger than 100px x 100px.

Read all of “Resizing images on the fly”