Results 1 to 5 of 5

Thread: facebox "close" button position

  1. #1
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default facebox "close" button position

    1) Script Title:
    Facebox image & content viewer 1.1

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ebox/index.htm

    3) Describe problem:
    I'm linking some pages via facebox that have a lot of content. I don't expect them to be read often (mostly legal stuff and other dry info), so I'm not too worried about having to scroll through them in a narrow window...

    HOWEVER, I was hoping someone could help me move the "CLOSE" button from the bottom of the viewer window to the top -so people don't have to scroll all the way down to close it if they open it accidentally. could it be done through css, without messing with the script itself? I'm trying to figure out css, but it's an uphill battle. Thanks, everyone!

    page is here ("More about USPS" link)

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Simply locate inside the .js file the following portion:

    Code:
                <td class="b"/> \
                <td class="body"> \
                  <div class="content"> \
                  </div> \
                  <div class="footer"> \
                    <a href="#" class="close"> \
                      <img src="'+this.close_image+'" title="close" class="close_image" /> \
                    </a> \
                  </div> \
    The part in red pertains to the footer area, including the Close button. You can move that upwards, such as:

    Code:
                <td class="b"/> \
                <td class="body"> \
                  <div class="footer"> \
                    <a href="#" class="close"> \
                      <img src="'+this.close_image+'" title="close" class="close_image" /> \
                    </a> \
                  </div> \
                  <div class="content"> \
                  </div> \

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    traq (05-12-2008)

  4. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    very cool. I thought it might be that simple, but I tried it last night and it started causing script errors, so I kinda freaked out and stopped messing with it. I guess I cut-n-pasted wrong, because it works fine now. thanks!

  5. #4
    Join Date
    Nov 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Positioning Close Image

    Apart from repositioning your close image or down you can also define it's absolute position and even change the imge and have a close button similar to digg. here is what I tried by simply using style instead:

    <div id="facebox" style="display:none;"> \
    <div class="popup"> \
    <table> \
    <tbody> \
    <tr> \
    <td class="tl"/><td class="b"/><td class="tr"/> \
    </tr> \
    <tr> \
    <td class="b"/> \
    <td class="body"> \
    <div class="content"> \
    </div> \
    <div class="footer" style="display:block;height:36px;position:absolute;right:20px;text-decoration:none;text-indent:-2000em;top:8px;width:36px;"> \
    <a href="#" class="close"> \
    <img src="images_facebox/closelabel.gif" title="close" class="close_image" /> \
    </a> \
    </div> \
    </td> \
    <td class="b"/> \
    </tr> \
    <tr> \
    <td class="bl"/><td class="b"/><td class="br"/> \
    </tr> \
    </tbody> \
    </table> \
    </div> \
    </div>'

    Hope this helps...

  6. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    um... actually, this problem was solved over a year and a half ago, but thanks.
    It was before I knew how to put "resolved" on my threads. if any mods or admins are reading, this thread can be closed.

Bookmarks

Posting Permissions

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