Drupal 6 and IE8 - Wrong content width


Author Message
Mykee

Posted: 11/22/2010
Quote message 

Dear developers,

I made two template for Drupal 6:
- two and
- three columns, and put any content to right sidebar or menu.
Content width made wrong size under IE8! Just please test it on this test site:
http://drupal.sablonbolt.com
Select sb002dw or sb003dw with IE8! With Firefox and Chrome working good, but under IE8 is bad!

Please fix it, because same template good under Joomla or WordPress with IE8.
 
Mykee

Posted: 11/22/2010
Quote message 

If use IE8 with compatibility mode, then template chooser button no show, but content with is correct... :-X
I used Artisteer 3.0 for templates.
 
Mykee

Posted: 11/22/2010
Quote message 

Here is my problem. I found this inline style on source code with IE8 developer tools.
If uncheck width=0; parameter, my template will show correct. But where can I uncheck this generated (by jquery) inline style???


 
Mykee

Posted: 11/22/2010
Quote message 

This problem under only IE8?
I found these links with jQuery handle bugs:
http://www.code-styling.de/english/jquery-132-causes-problems-at-ie-8
http://stackoverflow.com/questions/879137/problem-with-jquery-in-internet-explorer-8

Drupal 6 with Artisteer templates not working with IE8 native? Only with IE7 emulated mode?
 
Mykee

Posted: 11/22/2010
Quote message 

Here is the fix, and working with IE8 native mode. Developers please fix it!

Open script.js (in drupal theme folder), and search this code:
jQuery(window).bind('resize', function () {         if (c.w == c.parent().width()) return;         var w = 0; c.css('width', "0");


Change this line:
var w = 0; c.css('width', "0");


To this:
var w = 0; c.css('width', "575");


Where "575" is a content width size! If you have 800px template with 225px right column, then just calculate it: 800-225=575 is a good number.

Please fix it for IE8!
 
Mykee

Posted: 11/28/2010
Quote message 

If make fluid theme, then change "0" to "100%". Under IE8 if window smaller than original, then click refresh, and content size will be correct width. Under other browsers resize will working correctly.

If make fixed width size, then I have second tip: use Firebug with Firefox for good width parameter:
- Just upload template to server
- Open with Firefox, and look width parameter in Firebug for this:
art-layout-cell art-content

- If width size is 563px, then change "0" to "560" (a few pixel is not problem, use round to 0 or 5, but select smaller number, round down!)
- Change fixed script.js and look with IE8!
 
Mykee

Posted: 11/28/2010
Quote message 

Ok guys, solution is very, very simple!!!
Just change this code in script.js (see below right place):
var w = 0; c.css('width', "0");


To this:
var w = 0; c.css('width', "100%");


This parameter working fixed and fluid with templates! Simple and clear fix for Drupal 6 templates. :-)
Developers please fix it!
 
Lawrence

Posted: 11/29/2010
Quote message 

You said it works under Joomla and Wordpress? I believe it's an IE8 issue, although this fix does have usefulness. Great find!

I don't think the Artisteer team is going to apply this until IE8 is finished, but you never know.
 
Mykee

Posted: 11/30/2010
Quote message 

Yes, I have three sample webpages, and under Joomla and Wordpress working original generated code, but under Drupal not. Just try it with Drupal 6: generate a two or three columns template and install it, and set by default. Content will be very little width under IE8.
But if change this parameter tio 100%, then when cannot detect width size, then will be 100%, others will be correct width (under IE7, Opera, Firefox, Chrome, IE9).

This fix no change anything under modern browsers, but fix under IE8...
 
tk

Posted: 12/1/2010
Quote message 

Quote Mykee:

Ok guys, solution is very, very simple!!!
Just change this code in script.js (see below right place):
var w = 0; c.css('width', "0");


To this:
var w = 0; c.css('width', "100%");


This parameter working fixed and fluid with templates! Simple and clear fix for Drupal 6 templates. :-)
Developers please fix it!


Does this apply to Joomla I looked at my script.js and cant find the code?

 
Mykee

Posted: 12/1/2010
Quote message 

You don't need apply this patch to Joomla 1.5, only for Drupal. But found in script.js
/* begin Layout */
section in Joomla template folder too.