Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » PHP

Getting Around IE7 Bug

 
Jump to:  
 
h3xx
PostPosted: Fri Aug 29, 2008 2:03 pm    Post subject: Getting Around IE7 Bug
       
Sorry, this isn't specifically related to PHP, but to an odd bug I
came across when testing some code inside IE7.

The problem is that IE7 freezes, but only when the following
conditions are met:

1. An image inside of a block-level container, A, where the image is
enlarged or shrunk by CSS to have a width of 100%, which makes it
stretch to fill the container.

2. The container, A, is floating and its "max-width" property
(unsupported in IE7) is emulated with the following property:

width: expression(
this.clientWidth > this.parentNode.clientWidth / 3 ?
"33%" :
"auto");

which basically has the effect of setting its max-width to 33% using
JavaScript. For more on the expression() function, look at
LINK

3. The container, A, is inside of another block-level container, B,
whose width is set by CSS.

Example code:

<style type="text/css">
..boundingbox {
width: 800px;
border: 1px dotted black;
}

..image {
float: right;

/** setting a maximum element width **/
/* for sensible browsers */
max-width: 33%;

/* for internet explorer
* note: this seems to be a bit buggy -- it seems to work, however,
if
* the image's bounding box is not given a width by CSS
*
* for more information on the "expression()" function, go to
* LINK
*/
width: expression(
this.clientWidth > this.parentNode.clientWidth / 3 ?
"33%" :
"auto");
}

/**
* make sure the images inside obey their parent's sizing rules
*/
..image img {
width: 100%;
}

</style>

<div class="boundingbox">

<div class="image"><img src="http://128.104.64.199/big_image.jpg"></
div>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Suspendisse id leo ac magna pharetra ultrices. Duis non orci eu justo
imperdiet aliquam. Suspendisse mollis nulla vel pede. Aliquam id est a
mi fringilla rutrum. Pellentesque euismod adipiscing lectus. Ut eu
sapien. Curabitur libero ligula, luctus commodo, sagittis quis,
aliquet vitae, leo. Pellentesque et purus.</p>

</div>
 

 
Captain Paralytic
PostPosted: Fri Aug 29, 2008 2:28 pm    Post subject: Re: Getting Around IE7 Bug
       
On 29 Aug, 15:03, h3xx <amphetamach...@gmail.com> wrote:
Quote:
Sorry, this isn't specifically related to PHP,

It isn't even generally related to php. So why post it here?
 

 
sliverdigger
PostPosted: Fri Aug 29, 2008 3:32 pm    Post subject: Re: Getting Around IE7 Bug
       
h3xx wrote:
Quote:
On Aug 29, 9:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
On 29 Aug, 15:03, h3xx <amphetamach...@gmail.com> wrote:

Sorry, this isn't specifically related to PHP,
It isn't even generally related to php. So why post it here?

Because comp.lang.html doesn't exist and I thought a bunch of PHP
hackers might be used to dealing with browsers' problems.

comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.stylesheets

......there are some knowledgeable helpful and often crabby ogres over
there too.

--
cut the board three times and it's still too short
 

 
Jerry Stuckle
PostPosted: Fri Aug 29, 2008 4:15 pm    Post subject: Re: Getting Around IE7 Bug
       
sliverdigger wrote:
Quote:
h3xx wrote:
On Aug 29, 9:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
On 29 Aug, 15:03, h3xx <amphetamach...@gmail.com> wrote:

Sorry, this isn't specifically related to PHP,
It isn't even generally related to php. So why post it here?

Because comp.lang.html doesn't exist and I thought a bunch of PHP
hackers might be used to dealing with browsers' problems.

comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.stylesheets

.....there are some knowledgeable helpful and often crabby ogres over
there too.


Or even alt.html...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
 

 
h3xx
PostPosted: Fri Aug 29, 2008 5:15 pm    Post subject: Re: Getting Around IE7 Bug
       
On Aug 29, 9:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
Quote:
On 29 Aug, 15:03, h3xx <amphetamach...@gmail.com> wrote:

Sorry, this isn't specifically related to PHP,

It isn't even generally related to php. So why post it here?

Because comp.lang.html doesn't exist and I thought a bunch of PHP
hackers might be used to dealing with browsers' problems.
 

 
nice.guy.nige
PostPosted: Fri Aug 29, 2008 10:06 pm    Post subject: Re: Getting Around IE7 Bug
       
While the city slept, Jerry Stuckle feverishly typed:

Quote:
sliverdigger wrote:

[...]

Quote:
comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.stylesheets

.....there are some knowledgeable helpful and often crabby ogres over
there too.


Or even alt.html...

Indeed... We're even more crabby over there! ;-)

Cheers,
Nige


--
Nigel Moss | LINK
Email not valid. nigel@dog.nigenet.org.uk - take the dog out!
"You're mother ate my dog!", "Not all of him..."
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

apteka gry dla dzieci lokata bingo online parker