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
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts

    Centering an image within thickbox

    I'm having the stupidest problem I could ever imagine and something that I should be able to sort out but for some reason my two week holiday has rendered me incapable of any web design at all!

    On this page I have some thickbox pop ups that bring up some information about the aircraft in question. Click on the image of the aircraft or any of the links for that aircraft to bring it up...

    I want the middle image of the cockpit layout to be centered on the screen. But I just can't get it to center. I have tried wrapping it in a div and doing text-align center, tried margin: auto; but nothing seems to work! Any help would be greatly appreciated...

    There are two stylesheets associated with this page;

    The Main Style
    The ThickBox Style

    I'm currently using:

    Code:
    #TB_ajaxContent .cabin {
    	text-align: center;
    }
    in the thickbox to attempt the centering.

    Thanks guys
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It looks like that image is floated. Change this
    Code:
    <span class="cabin">
    
    		<img src="resources/images/eclipse_interior.jpg" alt="The Seating Plan" />
    	</span>
    to this
    Code:
    <img class="cabin" src="resources/images/eclipse_interior.jpg" alt="The Seating Plan" />
    Then in your CSS
    Code:
    img.cabin {
    display:block;
    float:none;
    margin:auto;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    Cheers Aero! I hadn't noticed that float in there, sorted now!
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools


  •  

    Posting Permissions

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