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 8207107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:53:51+00:00 2026-06-07T08:53:51+00:00

I am trying to build a page to display two images side by side.

  • 0

I am trying to build a page to display two images side by side. I want these items centered on the screen in a book format and as the browser is resized, the images height is changed so they fill the window.

In order to do this I am using display inline-block with text-aligned center to achieve the affect. IT works great on FF but when I open in Safari or Chrome on resize the divs begin to overlap. I created this jsfiddle to show an example of my dom. I need the pageOne and pageTwo divs inline-block because later I absolutely position links on top of the page images.

What am I missing?

In order to see that issue, you’ll need to open the jsFiddle in safari/chrome and make the result pane larger than the default. Start with your Browser about 1/2 its normal width/height. As you run the jsFiddle, enlarge your browser and notice how the two images begin to overlap. If you open it in FF they wont overlap.

http://jsfiddle.net/X9NNh/1

I was able to get close to the effect I want in all the browsers with this using tables:

http://jsfiddle.net/x82uK/

  • 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-07T08:53:54+00:00Added an answer on June 7, 2026 at 8:53 am

    Indeed, this is tricky because those inline-block containers don’t resize themselves to fit their contents as their contents scale.

    Though it will make your job harder (read: require Javascript) when it comes to absolutely positioning links atop the images, here’s an alternative approach using background-size: contain.

    HTML:

    <div id="issue">
      <div id="leftPage" class="page" style="background-image: url(http://placekitten.com/g/304/400);"></div>
      <div id="rightPage" class="page" style="background-image: url(http://placekitten.com/g/304/400);"></div>
    </div>
    

    CSS:

    html, body {
      height: 100%;
      background: #666;
    }
    #issue {
      position: absolute;
      top: 20px; bottom: 20px;
      left: 20px; right: 20px;
      border: 1px solid grey;
      box-sizing: border-box;
      background: #EEE;
    }
    .page {
      position: absolute;
      top: 30px; bottom: 30px;
      background-repeat: no-repeat;
      background-size: contain;
    }
    #leftPage {
      background-position: center right;
      left: 30px; right: 50%;
    }
    #rightPage {
      background-position: center left;
      left: 50%; right: 30px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a simple page that will show book information, I
I'm trying to build an ASP.NET page that can crawl web pages and display
I am trying to build a browser using Python+pygtk+webkit. Now, I want to throttle
I am trying to build a page that will allow me to take an
I'm trying to build a Web page that has a rich text editor. Is
I'm trying to build a list page like the one in the Computers sample.
I'm trying to build a single page web based application, so the entire UI
I'm trying to build a simple html page which include some text paragraph, during
I am trying to build a jquery image slider for my home page ,,,,
I am trying to build multiple timers for my web page, so far I

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.