Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Location
    Milky Way
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile How to replace an image with another one?

    Or at least, cover it by a new one...

  • #2
    New Coder
    Join Date
    Jun 2009
    Location
    Hamphire, UK
    Posts
    47
    Thanks
    7
    Thanked 1 Time in 1 Post
    Erm, I think we'll need a bit more information than that!

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Location
    Milky Way
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The picture from here (the logo).
    I want to be different on a specific section of the forum, meaning here. As you can see, I've already put an image over, using this code:
    Code:
    <div style="position: absolute; top: 22px; left: 32px"><img src="http://friendsforever.co.cc/templates/fiblue3d/images/cellpic_fifa.jpg" border="0"></div>
    But it's not an optimal solution. First of all, yes, it looks good on viewforum, but on viewtopic (example here) the image gets shrinked by a script for shrinking posted images...
    I want a better solution. I've also tryed the following:
    Code:
    <script language="javascript">
    var objDoc = document.getElementsByTagName('img')
    var i
    var newImage = 'http://friendsforever.co.cc/templates/fiblue3d/images/cellpic_fifa.jpg'
    
    
    for (i=0; i<objDoc.length; i++) {
      if (objDoc[i].src.match(/cellpic_bkg/)){
        objDoc[i].src = newImage;
      }
    }
    </script>
    But it doesn't work.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •