Overflow (images pushed down) issue in IE and a pseudo-fix.

Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Thu, 2005-01-20 21:26

I've been fighting with this issue since I first installed G2, my users are constantly complaining that some page contents gets pushed down to the bottom (for example, when loading photos larger than the screen width) in IE.

I've tried uncommenting "/* html #gsAlbumContents {overflow: auto;} */ /* style for IE */", but that created ugly sidebars in FireFox on nearly *all* pages.

So, here's my homebrew solution that seems to work for me, I cannot say if it will work for anyone else: enabling that line only if the browser is IE. Note: this will add processing overhead each time a page is loaded.

1. cp templates/layouts/layout.css.php templates/layouts/local/layout.css.php
2. Open the local layout.css.php file
3. Find

#gsAlbumContents, #gsAdminContents, #gsOtherContents {
    float: left;
    width: 78%;
}

/* html #gsAlbumContents {overflow: auto;} */ /* style for IE */

.gbExif {
    padding: 8px 14px;
}

4. Replace with

#gsAlbumContents, #gsAdminContents, #gsOtherContents {
    float: left;
    width: 78%;
}

<?php
if (strstr ($_SERVER['HTTP_USER_AGENT'], "MSIE")) { //if browser is IE
    print "html #gsAlbumContents {overflow: auto;}";
}
?>

/* html #gsAlbumContents {overflow: auto;} */ /* style for IE */

.gbExif {
    padding: 8px 14px;
}

I hope this helps anyone as desperate for a fix as I was.

 
volksport
volksport's picture

Joined: 2002-10-06
Posts: 239
Posted: Fri, 2005-01-21 01:59

I thought this was fixed in CVS for at least a few weeks? I still notice it in a few administration pages, but it is fixed for album/item views.

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Fri, 2005-01-21 02:28

I did a clean install of today's CVS just to test it out, volksport.

Here's a photo you can use for reference: http://www.hostom.com/gallery2/main.php?g2_view=core:ShowItem&g2_itemId=12&g2_imageViewsIndex=1

Edit: to clarify, that is today's CVS test install *without* the patch applied (or any modifications, for that matter)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-01-21 04:06

the "fix" was rolled back because it covered the footer. see other topics in this forum.

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Fri, 2005-01-21 21:30

Strangely enough, it used to cover the footer before for me (that's why I didn't want to implement it), but now it appears fine (in both IE and firefox).

 
thumb
thumb's picture

Joined: 2004-05-26
Posts: 238
Posted: Sat, 2005-01-22 05:56

I'll try implementing and testing your addition tomorrow. If it works in IE I'll commit it for lack of a non-PHP, strictly CSS solution.

Thanks for sharing it!

 
thumb
thumb's picture

Joined: 2004-05-26
Posts: 238
Posted: Tue, 2005-01-25 06:23

Hmmm. I tested and adding this code seemed to cause the thumbnail matrix (with 4 columns) to wrap in Firefox. I'm testing Gallery 2 with Windows browsers on Virtual PC on my Mac and it runs like a dog. As a result, I didn't fully test in IE.

Take a look at your G2 install in not only Firefox and IE, but also Opera and let me know.

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Wed, 2005-01-26 02:11

It does seem to wrap in Firefox @ 4 columns, yes. Quite unfortunate.

I'm not an expert at CSS, so I really wouldn't know what to do about this, I also have a crapload of other pages that are being pushed down in IE (mainly admin pages).

*sigh*, I wish people would just use proper browsers.