Info
- 3 posts
- 1 voice
- Started 2 years ago by dogdayfear
- Latest reply from dogdayfear
- This topic is resolved
Javascript breaks style
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
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 ...
-
- Posted 2 years ago #
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.
-
You must log in to post.