PDA

View Full Version : Custom style causes a javascript/css bug in IE


Erpenator
12-07-2009, 12:28 PM
We've implemented a custom style for our vBulletin forum and so far everything seems to work well. But there are 2 bugs which we do not seem to be able to tackle.

One of these bugs is when you go (for example) to this thread (http://club.myce.com/f34/mobile-fidelity-cds-305616/#post2472435) in Internet Explorer (7 or 8). When you remove the #post2472435 from the URL everything seems to work okay.

The same this occurs when you edit a message. I've debugged as much as possible and it seems, this part of the vBulletin script will move the #content div to the left:
var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj .scrollIntoView(true);else {cpostno = cpost.substring(5,cpost.length);if(parseInt(cpostn o)>0 && (cpost.substring(1,5)=='post')){document.location. href='showthread.php?p='+cpostno;};} }

I wasn't able to find the script which is causing the same behavior when editing a message. Hopefully there are some VB, js, css guru's out here who can help me understand why this bug is showing up.

Lynne
12-07-2009, 02:24 PM
Judging by the url structure, the first issue seems to be an issue with your SEO. (It works fine in IE7 in Parallels on my Mac).

Erpenator
12-08-2009, 06:17 AM
Could you explain what you mean? Because we have vbSEO installed and with an other theme on the same site and with the same urls it works fine.

Lynne
12-08-2009, 01:48 PM
So it works fine with one style but not the other? (Sorry, I didn't get that part from your original post.) So, same exactly url, just a different style? Have you compared the source code from a working style page to a non-working style page and see what you have done differently in them?

Erpenator
12-08-2009, 02:00 PM
Yes it does work with the default vbulletin style but not with the custom one (It seems I forgot to mention that in my first post :) ). The html and css are completely different than the default style so it's hard to compare them and find something useful.

I think it's a css bug and some properties of an unknown div aren't set correctly. But I don't know which div is involved or what property.

Lynne
12-08-2009, 02:07 PM
Do you have firebug for firefox? It's a great addon that will help you with your css issues. I'm not sure how much help it may be here, but if you think the issue is css, then it may help.

Erpenator
12-08-2009, 02:11 PM
Yes, i do have firebug en some debug tools for IE 8.0 but none of them helped me so far :)