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

  • SEARCH
  • Home
  • 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 8702943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:46:23+00:00 2026-06-13T02:46:23+00:00

I’m working on a design for mobile devices similar to this one: http://jsfiddle.net/rdCdx/ I

  • 0

I’m working on a design for mobile devices similar to this one: http://jsfiddle.net/rdCdx/

I need to meet these requirements:

  • [edit] fit the image on the left to match the height of the space between top-menu and bottom-menu
  • preserve the aspect ratio of the image on the left.
  • have the #products-list div occupy the rest of the #content‘s width (right now I’ve hard coded a value there, this isn’t fluid and this won’t work on different devices)
  • have the .button float right and occupy a percentage(say 10%) of the .product‘s width

How can this be accomplished?

Edit: The point where I am stuck is that I cannot think of a way to make the element on the right, namely the #products-list element, to have a width equal to the width of the screen minus the width of the image.

what have you tried?

I can’t think of any good way to make progress towards my requirements given the knowledge that I have. Also, I haven’t seen something like this done anywhere else.

  • 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-13T02:46:24+00:00Added an answer on June 13, 2026 at 2:46 am

    You could use the HTML… This will preserve the aspect ratio but will scale the image up to whatever height it needs for the width to be 50% of the content container.

    <style type="text/css">
        img { width: 50%; float: left; }
        #product-list { width: 50%; float: right; }
        .product { overflow: hidden; }
        .button { width: 10%; float: right; background: red; }
    </style>
    <div id="content">
        <img src="http://balloonraces.homestead.com/balloon.jpg"/>
        <div id="product-list">
            <div class="product">
                <a class="button">Button</a>
            </div>
        </div>
    </div>
    

    Or, the following retains the size of the image and the product list will take up the remaining space.

    <style type="text/css">
        img { width: 200px; float: left; }
        #product-list { margin-left: 200px; }
        .product { overflow: hidden; }
        .button { width: 10%; float: right; background: red; }
    </style>
    

    You can specify more complex behaviour by determining the stops where you want one to start behaving like the other, say you want the latter example up until the point there is a 1:1 ratio between the two and scale down using media queries.

    <style type="text/css">
        img { width: 200px; float: left; }
        #product-list { margin-left:  200px; }
        .product { overflow: hidden; }
        .button { width: 10%; float: right; background: red; }
    
        @media screen and (max-width: 400px) {
            img { width: 50%; }
            #product-list { width: 50%; float: right; margin: 0; }
        }
    </style>
    

    Anything more complex than that will likely involve JavaScript.

    Edit as you have changed the conditions of your question, you want the image to always be 100% of the height, this answer no longer holds true. Instead use the following CSS…

    <style type="text/css">
        img { height: 100%; float: left; }
        #product-list { overflow: hidden; }
        .product { overflow: hidden; }
        .button { width: 10%; float: right; background: red; }
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.