Jump to content

divs are displayed differently in chrome than in firefox and explorer


gwolff2005
Go to solution Solved by gwolff2005,

Recommended Posts

Hi guys,
I need your help please. i worked on my site and everything looks fine apart from two divs. They appear in IE and FF fine but not in Chrome (see picture attached).

First picture show in FF and IE which is correct  the second one in chrome.  The red CIRCLES (not the square) are the problems.

 

The code for the facebook div is:

        <div class="fb-share-button" div style="position:relative;top:-50px;left:690px;z-index:4; width:345px; float:right;" data-href="http://www.guntmarwolff.com" data-type="button_count"></div>
    </div>

The code for the picture div is:

 

     <div style="position:relative;top:85px;left:0px;z-index:5000px;"><script type="text/javascript">
 var imlocation = "images/";
 var currentdate = 0;
 var image_number = 0;
 function ImageArray (n) {
   this.length = n;
   for (var i =1; i <= n; i++) {
     this[i] = ' '
   }
 }
 image = new ImageArray(3)
 image[0] = 'main_ad3.jpg'
 image[1] = 'main_ad4.jpg'
 image[2] = 'main_ad5.jpg'
 var rand = 60/image.length
 function randomimage() {
     currentdate = new Date()
     image_number = currentdate.getSeconds()
     image_number = Math.floor(image_number/rand)
     return(image[image_number])
 }
 document.write("<img src='" + imlocation + randomimage()+ "'>");
</script></div>

What am I doing wrong?????

Please help. Thanks!!!!

 

ffandie.png

 

 

 

 

 

chrome.png



 



 

Link to comment
Share on other sites

After further review - I also see that you have wrapped your JS code inside another div tag.  People may have problems with my next, but I find it preferable to place my js within my html header tag and not intermingle it with my html code.  You can do it I guess, but I fail to see why.  Frankly, the div here serves no purpose at all.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.