Forums

Join
bbPress Support ForumsTroubleshootingJavascript breaks style

Info

Javascript breaks style

  1. I have included this piece of code at the top of my index.php file:

    <script language="javascript">
    if(top==self)
    this.location='http://www.somedomein.es/somefolder/page';
    </script>

    It checks if bbpress is loaded into an iframe and if not, it redirects to http://www.somedomein.es/somefolder/page and this page load bbpress correctly into an iframe.

    It works perfectly but it breaks the style making the some fonts bigger that they should.

    If I remove the javascript code everything works normally again.

    Any suggestions ?

    Thanks in advance.

  2. Mmmm ....

    if I include the javascript at the end of the file index.php it does not break the style, but the delay of the redirect is very big ...

  3. I moved the javascript code from index.php to file header.php (between <head> and </head> tags) of the template Im using and everything works now.

  4. You must log in to post.