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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:02+00:00 2026-05-26T23:23:02+00:00

I was looking at the canvas app The Eatery has created and I noticed

  • 0

I was looking at the canvas app The Eatery has created and I noticed how the layout is fluid. Specifically the #main column’s left margin enlarges as the page is widened. I looked through the CSS with Chrome’s inspector and I can’t see what property is set that starts with a default distance from the left edge, but that grows with the length of the page. There is an inline style, but I don’t understand how it’s relative to the width of the window.

I can duplicate it using something like left:5%; but I don’t think that’s what’s happening in particular on this page. Because, watching it in the inspector, it’s pixel-based sizing and using a percent keeps the percents in the CSS. Any idea what’s happening on that page that I can’t seem to duplicate?

I’ve looked through a ton of the fixed-width questions on SO, but none of the answers seem to do it.

  • 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-05-26T23:23:02+00:00Added an answer on May 26, 2026 at 11:23 pm

    It’s made by javascript onresize event.

    In this particular the code is:

    var a=$(window).width()
    b=184;
    $("#main").css("left", Math.max( (a-500-600)/2, 20) ), 
        $(window).height() < 800 ?
        ($("#hand, .hand-image").addClass("smaller") , b=96 ) :
        $("#hand, .hand-image" ).removeClass( "smaller" ), $("#app-store").css("right", Math.min(a-850, b ) );
    

    — remove from the source code —

    The idea is simple, take the width of document or window and move the div to a position based on the size. In the case, the left value is the higher between (a-500-600)/2 and 20 (px).

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

Sidebar

Related Questions

I am looking to create an Eraser for a drawing app in Canvas, and
I'm looking for opinion on using Canvas vs. Grid panels in WPF. I need
I am looking at using HTML5 Canvas element for my upcoming project. I want
I would like to have fuzzy looking border around my Canvas control. Basically, I
I am not looking to create new events. I need to create a canvas
i'm looking at creating a web game using html5 canvas and javascript. i was
I'm looking for a canvas-like element to use in iOS apps. By canvas-like I
I'm looking for a way to clone a canvas element. Based on this question
I'm looking at this: http://www.netmagazine.com/tutorials/create-page-flip-effect-html5-canvas However, I have one problem with that - I
In my canvas app, I make a call to https://graph.facebook.com/<fbid> and the return value

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.