Monday, 2 May 2011

Print CSS for Internet Explorer 7

Well. What better way to spend time on a bank holiday weekend after the recent "Royal Wedding".

An Internet Explorer 7 (IE7) feature was preventing the page content beyond the first page from printing properly for Albany UK property projects. In the browser's print preview option, the first page was displaying but with content truncated at the foot of the page. The second page onwards showed only the css background color/image but no page content.


Interestingly, Firefox, Safari and Internet Explorer 8 printed out the pages correctly, although some of the property listings were getting cut in half at the end of the page. Not pretty.

The fix was to invoke the less well known CSS feature "display:inline-block;" for the outer box (div) containing the property listing divs, the property listing divs themselves, and (because of the WordPress structure) the .article class (each property listing is technically a post.)

Sounds straightforward? Well, no. The other part of the fix was to use a CSS hack, or IE7 selector, so that the styles would only be applied in IE7 browsers.

e.g.
#main {position:relative; *position:static; *display:inline-block;}
.article {*display:inline-block;}

Applying the changes to affect all browsers broke the print layout in IE8 and Firefox.

There are some general guides for avoiding CSS print issues:

Beware floats
Stay mindful of absolute or relative positioning
Watch the use of height and width defined in px
Keep an eye on overflow

Ideally the print layout should display all content inline and with auto properties (width, height, position, overflow, etc.) and the browser rendering engine should never be confused by boxes within boxes (nesting of block level elements) but when does that happen, eh?

Some google results that helped...
The Blog of Ben Nadel
ServerFault

Saturday, 16 April 2011

Eventful Galloway

Right, that's the DG Arts Festival events now live for booking using the patronbase system on dgArts events system. The festival starts on the 20th May, the day before the 'Streets of Dumfries' event which is a big bag of fun...

A lot of the visual arts exhibitions and children's events are free which is a bonus.

The dgArts website provides a central hub for events in the region so that the geographically widespread arts related groups can have a central marketing point (Bureaucratic Centralism anyone?)

Also listed there is the Thornhill Blues festival (see below), taking place further up the A76 from Dumfries at the end of April. No, it's not sold out yet but the accommodation in the town is pretty booked up so unless you get in quick you may have to use the campsite or stay nearer Dumfries on the Friday night.

Friday, 1 April 2011

Inaugural blues festival in Thornhill

The end of April heralds the first Blues Festival in Thornhill, Dumfries and Galloway. Organised by local enthusiasts from its inception last year, the blues band itinerary is now online and you can get tickets using paypal.


If you live in the Thornhill area there are a few outlets selling tickets for the main event in Thornhill Community Centre on the night of Saturday 30th April.

The initial website was a simple wordpress install, slightly customised, to get the Thornhill Blues online. It uses google documents as the source of the embedded spreadsheets. After the festival Callisti would like to improve the website usability and functionality.

Friday, 25 March 2011

Event Decor Hire - Redecorated

More customised Wordpress theming using child themes here: background static image for the body with CSS3 box shadow and IE8 fallback - CSS3 gradient works in firefox but not safari or ie8 just now but maybe one day...


The revision concentrates on the silver and blue colours of the logo, dispensing with the heavier burgundy so there's an altogether lighter feel to the website. Use was made of the custom menu feature in wordpress 3 to rationalise the content (and make it more user-friendly for the client to update content and images.)

Sunday, 6 March 2011

Excalibur Wedding Cars - Mk2

This was fun! A complete revamp of the wedding limousine website using some CSS3 stuff, background image shenanigans, a touch of wordpress plugin-ery and some more experience of using custom themes and menus the way wordpress 3 suggests.


Playing with the custom header images using the set thumbnail function is rewarding but unless you re-define the dimensions of the header image in the wordpress settings, you need to think letterbox or panoramic landscape when selecting images that are going to look right.

Naturally :) there were some editions to functions.php as it still uses the parent theme for this file. The nod to social networking includes facebook like buttons and a recent activity widget.


To ease migration from the previous website, 301 redirects were employed - the xml sitemaps were updated with Yahoo and Google once the SEO-friendly URLs were set.

Saturday, 5 March 2011

Online PDF reader

Handy tool for displaying pdf's in readable format on your website. A bit like the animated pageflip idea which is built using images, this service allows pdf documents to be read in a similar fashion.

So, as a working experiment, the Dumfries and Galloway Arts Festival brochure for 2011 is now readable on the home page.

The script was generated by Calameo, where you can register to use the service.

Sunday, 20 February 2011

Wedding Lounge

The Wedding Lounge (Dumfries) is a new wordpress-based website built using child themes, custom menus and CSS3 - more in line with the way a wordpress framework ought to be customised. There is still a concession to the functions.php file as the parent theme version takes precedence over the child theme in this respect but this may change in future.



The Weddding Lounge website is to promote the services of an upcoming wedding photographer and wedding planner. The site is ready for the start of the wedding shows and fairs being held in Dumfries and Galloway in 2011 so provides an online source of information, as well as linking with the existing facebook profile and image galleries.