foreverqihe / reallysimplehistory

Automatically exported from code.google.com/p/reallysimplehistory
Other
0 stars 1 forks source link

Centered Layout in IE7 shift to the Left #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

 My centered Layout in IE7 shift to the left if RSH is implemented. I use
RSH 0.6 Final. This problem is only in IE7 and no other browser.

Original issue reported on code.google.com by webmas...@basic6.de on 14 Aug 2008 at 2:38

GoogleCodeExporter commented 9 years ago
I had the same problem and fixed in after ours researching. It has to do with 
the
styling. You have to add an iehack to windows.historyStorage.setup right after 
var
textareaStyles is set. You can add the below standing code there

/* IE hack that prevents centered layout to shift to the left in IE7 */
if(window.dhtmlHistory.isIE) {
    var textareaStyles = (historyStorage.debugMode
    ? 'width: 800px;height:80px;border:1px solid black;'
    : 'width: 800px;height:80px;border:1px solid black;display:none;'
    );  
    var formStyles = this.debugMode ? historyStorage.showStyles :
'border:0;margin:0;padding:0;';
}

Original comment by juulh...@hotmail.com on 9 Oct 2008 at 1:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the same problem (I think)... my whole page moved ~10 pixels to the left.
Though I found just recently that I had included the 

<script type="text/javascript">
            window.dhtmlHistory.create();
....
</script>

in the <head> section (stupid me). After moving it to <body> the page is 
displayed
fine...

Original comment by spannov...@gmail.com on 23 Oct 2008 at 3:02

GoogleCodeExporter commented 9 years ago
The problem is present in the current sources as well.
I've fixed it by replacing line 647 with 

        var formStyles = historyStorage.showStyles;

It looks like hidden styles, when set on form object, break the layout someway.
This change fixed broken layout on IE7 and didn't affect FF3.0.4/Safari 
3.2.1/Opera 9.50 (all on Mac).

Hope this helps to someone :)
Regards,
KIR

Original comment by kirill.m...@gmail.com on 5 Dec 2008 at 10:14

GoogleCodeExporter commented 9 years ago
Thanks juulh! Worked for me :)

Original comment by knad05 on 29 Mar 2009 at 5:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
spannovich's solution helped me resolve an IE7-only bug that caused the layout 
to 
shift to the left for a brief moment. This was only present with a height=100% 
on 
the CSS, which initially had me going down a really wrong (and long) path 
trying to 
resolve the issue.

Original comment by akas...@gmail.com on 24 Jun 2009 at 8:50