Image In One Place (PHP Code?)

Discussion in 'BlackHat Lounge' started by SpellZ, Aug 23, 2012.

  1. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    I Believe I seen this done in the Warrior Forum, not sure.

    But I was wondering if it's a fairly simple PHP script, and if anyone can help out? Or maybe send me to the wordpress plugin if it exists?

    I pretty much I want to put an image right at the bottom-left or bottom-right corner of my site. So even if people scroll they will always see it.

    Should be fairly easy to add, no?
     
  2. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,046
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
  3. WPRipper

    WPRipper Supreme Member

    Joined:
    Mar 24, 2010
    Messages:
    1,414
    Likes Received:
    1,545
    Location:
    Proudly romanian
    Yeah Autumn is right, this can be done via CSS.
     
  4. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    Well, truth be told, I'm no programming guru.
    I was kinda hoping that there would be some sort of wordpress plug-in.
     
  5. dracony2

    dracony2 Regular Member

    Joined:
    Mar 5, 2010
    Messages:
    350
    Likes Received:
    322
    Location:
    Jupiter
    #banner{
    position:fixed;
    bottom:0px;
    right:0px;
    z-index:999;
    width:300px;
    height:300px;
    }

    Smth like this
     
  6. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    edit.
     
    Last edited: Aug 23, 2012
  7. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON

    Doesn't go on TOP of everything.
    It needs to go on top of blog posts, etc.
     
  8. dracony2

    dracony2 Regular Member

    Joined:
    Mar 5, 2010
    Messages:
    350
    Likes Received:
    322
    Location:
    Jupiter
    increase the z-index then =)
     
  9. roamer

    roamer Power Member

    Joined:
    Dec 2, 2008
    Messages:
    500
    Likes Received:
    480
    Occupation:
    Gfx designer, vfx and mgfx
    Location:
    plɹoʍ ǝɥʇ punoɹɐ ƃuıɯɐoɹ
    I remember when you had to do this with JS (ugh!).

    I bet that did it :).
     
  10. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    You would think, right?

    Well my knowledge isn't as umm.. knowledgable LOL! So I got the #banner.. now what? I have the .PNG file.. what is the code for putting it in the website?
     
  11. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,046
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Make a div with id=banner and then put your <img> tag inside that.
     
  12. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    trying now *insert evil devil bbm face here*
     
  13. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    UGH, LOL!

    Clearly I'm doing something wrong -_-

    So I put this inside home.php

    Code:
    #banner{position:fixed;
    bottom:0px;
    right:0px;
    z-index:999;
    width:300px;
    height:300px;
    }
    
    
    <div id="banner"><img src="http://i46.tinypic.com/b8pdg6.jpg"></div>
    Didn't work
     
    Last edited: Aug 23, 2012
  14. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    WELL IT DID WORK!

    Kinda...

    But even though it is at 0/0, it still doesn't touch the corners... why!?

    [​IMG]
     
  15. SpellZ

    SpellZ Regular Member

    Joined:
    Feb 8, 2009
    Messages:
    357
    Likes Received:
    314
    Location:
    Toronto, ON
    fixed it.

    I set it to 300px/300px

    Image was 200px/200px

    YES!

    woo!

    thanks!
     
  16. Zapdos

    Zapdos Power Member

    Joined:
    Oct 22, 2011
    Messages:
    597
    Likes Received:
    708
    Location:
    Eastern North Carolina
    You didn't close the img tag.

    <img src="xxx"></img>