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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:04:48+00:00 2026-05-27T19:04:48+00:00

I am trying to build a site using elastic layout. I have used Eric

  • 0

I am trying to build a site using elastic layout. I have used Eric Meyer’s CSS reset and also used body {font-size:62.5%} in my stylesheet.

Here is my HTML and CSS

html {bacgroound:url() no-repeat top center fixed;}  

body {font-family:Arial, Helvetica, sans-serif;
color:#000;
margin:auto;}

'id'other {background-color:color1;}  

'id'footer {background-color:color2;}
<html>  
    <head>  
    </head>  
    <body>  
    <div id="container">  
        <div id="gallery">  
        </div>  
        <div id="other">  
        </div>  
    </div>  
    <div id="footer">  
    </div>  
    </body>  
</html>

As you can see, if I set a fixed width for the body, the background for #other and #footer remain fixed. So I tried to get around it by setting the width to 100% and using margin: 0 8em 0 8em to center the gallery and the contents of #other and #footer.

The layout I am trying to achieve is basically a one-column layout containing a gallery of pictures. The whole gallery should be centered in the page. I have used em for defining margin and this causes different results in different browsers. If the gallery is centered in one browser, other browsers show a different result. I have tried Firefox, Chrome, and IE9.

Is there any way to produce identical layouts using em as the unit of measurement? Or should I try a fixed layout and use pxinstead of em?

  • 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-27T19:04:48+00:00Added an answer on May 27, 2026 at 7:04 pm

    Keep em or percentanges. They do work.

    However, using them for centering is probably part of your issue. Centering should be done with auto, for example:

    div.page {
      margin: 0 auto;
      width: 925px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to build a web site and I was using a CSS
Im trying to build call to action button on my site using jQuery. I
I have a site I'm trying to build and I've hit one little snag
I'm trying to build site using OOP in PHP. Everyone is talking about Singleton,
I'm trying to build a site that runs without refreshes, using Jquery and PHP
I am trying to build the interface of my WEB site using OOP. For
I am trying to build a web site in both English and Bulgarian using
I'm trying to build a site using HTML5's video tag so that I can
Im trying to build a little site using XML instead of a database. I
I'm trying to build an mp3 player for my site using JavaScript (and any

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.