Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2007, 09:31 AM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default positioning reliably across browsers

hi there,
I am building a website in which I have an animation: basically a background with modified images appearing over time....
With position: absolute (CSS) I can get everything working fine on any browser (logically).
However, I want to be able to centre the image. As soon as I make the positioning relative I get a cross-browser variation of one pixel (only for top).

Before I get into all kinds of difficult solutions like browser detection, I was wondering if anybody has any interesting suggestions?

Just to give you an idea, here are the pages:

 - absolute: www.bossnfish.nl/box/
 - relative: www.bossnfish.nl/box/testing.html

Apologies its not directly related to PHP - most of website is though ;)

Many thanks.
 
Old January 19th, 2007, 07:56 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

This is really a CSS question, not a PHP question, so you should post in the CSS forum.

http://p2p.wrox.com/forum.asp?FORUM_ID=143

That said, you're probably seeing a layout-related bug in IE.

Layout bugs can be corrected one of two ways, depending on the bug, you can supply CSS that triggers the internal hasLayout property to be true, see [1]. Or you can use a conditional comment style sheet [2] that targets IE specifically, where you can make a one pixel adjustment for that browser alone.

Again, haven't looked at the bug, but one of those is your fix.

[1] http://www.satzansatz.de/cssd/onhavinglayout.html
[2] http://msdn.microsoft.com/workshop/a...omment_ovw.asp

HTH!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
in browsers (such as IE) how can emulate a button abdollahzadeh.b C# 2005 3 August 6th, 2007 05:50 PM
in browsers (such as IE) how can emulate a button abdollahzadeh.b ASP.NET 2.0 Professional 0 April 11th, 2007 05:02 AM
xslt 2.0 in browsers ramarc XSLT 1 April 26th, 2006 11:14 AM
IIS problem in IE but not in other browsers Lynque Forum and Wrox.com Feedback 5 December 28th, 2004 09:02 PM
file protocol and non-IE browsers nemo-x HTML Code Clinic 1 July 19th, 2004 07:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.