Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7719329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:23:20+00:00 2026-06-01T03:23:20+00:00

I am trying to make the same user interface to preview image like on

  • 0

I am trying to make the same user interface to preview image like on facebook.
I have one separate view that I display in fancybox.
It must be that I have made same error with max/min width/height. Basically as I see comment div should be 340px width always. And image div is resizable based on image size. In images bellow I use wider image to better show problem.
I load it like this:

$(document).ready(function () {
        $('.fancybox').fancybox({
            'autoSize': true,
            'autoDimensions': true,
            'transitionIn': 'fade',
            'transitionOut': 'fade',
            'hideOnOverlayClick': false,
            'hideOnContentClick': false,
            'closeBtn': false,
            'type': 'ajax',
            'padding': 0, 
            'margin': 0,                        
            'minWidth': 500,
            'fitToView': true
        });
    });

It load view fine.
That inner view code is:

<div style="height: 610px; width: 1100px;">
    <div style="float: left; max-width: 510px;">
        <img style="max-height: 100%;" src="http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/393726_2631619232954_1329592446_32973068_1109612286_n.jpg" />
    </div>
    <div style="float: right; width: 340px; height: 100%; background: #ff0000;">
        <h3>
            Description</h3>
    </div>
</div>

This is what I get now:
enter image description here
And this is what I am trying to get:
enter image description here

UPDATE
Issue with smaller image based on @S.Visser answer.
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:23:22+00:00Added an answer on June 1, 2026 at 3:23 am

    In this example I use a table hack to center the image. The max width and height are there to make sure the image dont size to big.

    html

    <div id="popup-container">
    
        <div class="image">
              <img src="http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/393726_2631619232954_1329592446_32973068_1109612286_n.jpg" alt="" />
        </div>
    
        <div class="description">
            <h3>Description</h3>
        </div>
    
        <div class="clear"></div>
    
    </div>
    

    css

    #popup-container {
        height: 610px;
        width: 1100px;
        display: table;
    }
    
    #popup-container .image {
        display: table-cell;
        vertical-align: middle;
        background-color: #000;
    }
    
    #popup-container .image img {
        max-height: 100%;
        max-width: 760px;
    }
    
    #popup-container .description {
        width: 340px;   
        background-color: #FFF;
        height: 610px;
    }
    
    .clear {
        clear: both; 
    }
    

    Output:
    Output

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make the image title display at the same time the
I'm trying to make an install that puts a copy of the same files
I'm trying to make a tabbed user interface using an asp:Panel and the asp:TreeView.
Well guys, I'm trying to get that MongoDB feature working for hours: http://www.mongodb.org/display/DOCS/Http+Interface I
I am trying to make a simple web app. I have a User table
I'm trying to make it so that as long as a user is touching
I am trying to make a program about recipes. The user would have to
I'm trying to make two transparent images (having the same size/dimension) overlap within a
Trying to make a make generic select control that I can dynamically add elements
Trying to make a custom :confirm message for a rails form that returns data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.