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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:57:35+00:00 2026-05-15T00:57:35+00:00

I have a block level element which I am centering on the page. I

  • 0

I have a block level element which I am centering on the page. I have gotten it to work for all other browsers except IE6 where it ALMOST works.

http://tinyurl.com/28sh9eq

If I view the page in IE6 the red box is slightly off center of the pink one in IE. If I then resize the browser window it snaps into place where I want it. Uhhhhh…. yea…. what gives? How come resizing the window makes it work? I have also tried setting an explicit width on the wrapper with no avail.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <style type="text/css">

            BODY {
                text-align: center;
                font-family: Arial;     
                }

            .row_wrap {
                height: 100px;
                margin-bottom: 30px;
                background-color: pink;
                }

            .row {
                float: right;
                position: relative;
                left: -50%;
                text-align: left;
                clear: both;
                }

            .button1 {
                color: #FFF;
                height: 36px;
                text-decoration: none;
                position: relative;
                padding: 0 30px;
                background: url('button.gif') no-repeat 0 0;
                display: block;
                float: left;
                left: 50%;
                }

                .button1 .end {
                    width: 20px;
                    height: 37px;
                    position: absolute;
                    right: -2px;
                    top: 0;                             
                    background: url('button.gif') no-repeat right 0;
                    }
                .button1 .text {
                    font-size: 16px;
                    font-weight: bold;
                    white-space: nowrap;
                    height: 36px;
                    padding-top: 7px;
                    display: block;
                    float: left;
                    }
                .button1 .text .arrow {
                    vertical-align: 1px;
                    }

    </style>
</head>
<body>


    <h2>RTL: Button 1</h2>
    <div class="row_wrap">
    <div class="row" dir="rtl">
        <a href="#" class="button1">
            <span class="end"></span>   
            <span class="text"><span class="arrow">»</span> Hello 1.</span>
        </a>
    </div>
    </div>

    <h2>RTL: Button 1-2</h2>
    <div class="row_wrap" style="width: 400px;">
    <div class="row" dir="rtl">
        <a href="#" class="button1">
            <span class="end"></span>   
            <span class="text"><span class="arrow">»</span> Hello 1.</span>
        </a>
    </div>
    </div>

    <br/><br/>  

    <h2>Normal: Button 1</h2>
    <div class="row_wrap">
    <div class="row">
        <a href="#" class="button1">
            <span class="end"></span>   
            <span class="text"><span class="arrow">»</span> Hello.</span>
        </a>
    </div>
    </div>

</body>

Thanks for your help.

  • 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-15T00:57:35+00:00Added an answer on May 15, 2026 at 12:57 am

    A div with specific width and margin-left: auto; margin-right: auto should be centered also on ie6.

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

Sidebar

Related Questions

I have a block-level HTML element that contains multiple block-level and inline-level elements, e.g.
I have a block of preformatted code (<pre>) which overflows horizontally so there is
I have following Code Block Which I tried to optimize in the Optimized section
Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means
I have a structure where there's normally a page heading in (% block heading
I have a TinyMCE widget that is limited to only <p> tags and non-block-level
I have a block of product images we received from a customer. Each product
I have a block of code that works and I wanted to ask what
I have a block of JSP code that needs to be used in several
I have a block of code that basically intializes several classes, but they are

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.