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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:29:30+00:00 2026-05-16T08:29:30+00:00

I have an html page : <html> <head> <title> All Time Set Window </title>

  • 0

I have an html page :

<html>
<head>
<title>
All Time Set Window
</title>
</head>
<body>
<div align="center" style="width:1000px; height:100%; margin-left:auto; margin-right:auto;">
    <div style="width:100%; height:20%; background-color:#F8E0E0; float:top;">
        <div align="center">This is Header</div>
    </div>
    <div style="width:100%; height:60%; background-color:#F5F6CE;">
        <div align="center" style="width:70%; background-color:#E3F6CE; float:left;">This is Left Frame</div>
        <div align="center" style="width:30%; background-color:#E0E0F8; float:right;">This is Right Frame</div>
    </div>
    <div style="width:100%; height:20%; float:bottom; background-color:#F8E0E0;">
        <div align="center">This is Footer</div>
    </div>
</div>
</body>
</html>

I have used Margin-left & Margin-right to auto for taking div to center. This is working in Mozilla & not in Explorer. What is solution for the same.

  • 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-16T08:29:31+00:00Added an answer on May 16, 2026 at 8:29 am

    The correct solution (according to the spec) is the one you have. You should set both margins to auto to center the block.

    But as usual, explorer does not play by the rules. To make it center a block you have to set text-align of the parent element to center. Since you probably don’t want all the text in your element itself to be centered as well, you’ll have to negate the behaviour again by setting text-align to left on that one.

    <html>
      <head>
        <title>All Time Set Window</title>
      </head>
      <body>
        <div style="text-align:center">
          <div align="center" style="width:1000px; height:100%; margin-left:auto; margin-right:auto; text-align:left">
            <div style="width:100%; height:20%; background-color:#F8E0E0; float:top;">
              <div align="center">This is Header</div>
            </div>
            <div style="width:100%; height:60%; background-color:#F5F6CE;">
              <div align="center" style="width:70%; background-color:#E3F6CE; float:left;">This is Left Frame</div>
              <div align="center" style="width:30%; background-color:#E0E0F8; float:right;">This is Right Frame</div>
            </div>
            <div style="width:100%; height:20%; float:bottom; background-color:#F8E0E0;">
              <div align="center">This is Footer</div>
            </div>
          </div>
        </div>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following HTML Code <%@ Page Language=C# %> <html> <head> <title></title> </head>
I have a page thusly: <html> <head></head> <body> <iframe src=local.html></iframe> <iframe src=http://www.google.com></iframe> </body> </html>
I have a var that contains a full html page, including the head, html,
I have the following markup inside a master page <html xmlns=http://www.w3.org/1999/xhtml > <head runat=server>
How to find all files in directory? I have HTML page in some directory.
I have an html page that open a popup window when the page loads.
I have an html page with a link like this: <a href=javascript:window.print()>Print QR code</a>
I have a button and a div in my html page. Initially I used
I have HTML page where windows media player is embedded. It works very well
I have HTML page with some HTML element with ID=logo . I need to

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.