Updates to Drummond & Russell site

After the initial release of this website further testing has showed some rather interesting errors. These were mainly caused by developing the site in Internet Explorer. Testing in Firefox has shown some strange effects of the CSS and issues with the slide shows.

It appears that Firefox does not use the <object> tag in the same way as IE. Further investigation has shown that an <embed> tag can be used inside the <object> tag to allow this to work with both browsers.

Some rather interesting results were also seen with the CSS in Firefox. Most of these could be resolved with a bit of Googling. ONe main problem was with the way the main pag container had been centered on the page. Originally I had used a text-align: center in the <body> tag. Fine for IE, which is more tolerent of these shortcuts, but no so good for Firfox. This was solved by removing this code and replacing with auto margin sizes for both left and right margins. However, this didn’t seem to work too well in IE.

This left me with a slight problem, how to have two style sheets. Thankfully, I managed to find a pre-coded PHP class for browser detection. This was found here: http://apptools.com/phptools/browser/ With this I have managed to have seperate CSS Stylesheets for each of the offending browsers. More code to manage, but I’m only worried with the main stream browsers.

So after all this, the website is now up and running, with only a few changes to be made after a meeting with the customer. A lesson has also been learnt, develop in Firefox and bodge it for IE later!

Leave a Reply

Your email address will not be published. Required fields are marked *