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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trying to center an image

    I'm using this as a photo gallery:

    http://www.javascriptkit.com/script/...ntviewer.shtml

    However, some of my images are different sizes, how do I center the image?
    I've tried everything to no avail. I can't believe such a nice script doesn't center an image.

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    If you just give a style of text-align:center; to the container of the image, it'll align centrally, since the img tag is an inline one by default.

    Now post your current code or a link to your page, to get more help.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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