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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:45:39+00:00 2026-06-18T23:45:39+00:00

First I have checked and this is NOT a duplicate. The conditions are totally

  • 0

First I have checked and this is NOT a duplicate. The conditions are totally different than other questions here.
Please read my whole post before making an answer.

I have a ASP.NET page with unknown width and height size and I want to center all elements in it. No matter if it’s inline or block.

The <center> tag does what need but it’s obsolete.
The text-align:center; does not work in all conditions. [inline]
The margin:auto; does not work in all conditions. [block]

What already works for all web browsers is the following piece of code :

<div style="float: left; position: relative; left: 50%;">
    <div style="float: left; position: relative; left: -50%;">
       my elements here
    </div>
</div>

This piece of code works in all conditions but it causes Rad Telerik Ajax popups elements to have unknown popup position which usually appear outside page.

So what is EXACTLY equivalent to <center> tag which works for all browsers ?
Please don’t post current solutions which I have mentioned here !

  • 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-18T23:45:41+00:00Added an answer on June 18, 2026 at 11:45 pm

    AMAIK, you can’t achieve what you’re searching for, without applying all the methods you know. Take email clients for example, they don’t understand much of the new technologies we already have (not even an external StyleSheet). So, it’s a common practice that you use <center> tag for older render engines (including browsers).

    This is the concept of fallback and degradation, but in the presentation layer, not in the behavior layer. In other words, what should matter in your design, is to make that button send the data back to the server via ajax, and if the browser doesn’t support ajax, via a simple POST. But it might be centered in one browser, and not in another.

    I do recommend that you take a look at this brilliant website:

    http://dowebsitesneedtolookexactlythesameineverybrowser.com/

    By the way, have you tried to force the centering on every element on your page:

    *
    {
    text-align: center !important;
    margin: auto !important;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have checked out the various questions on this. The first provides a huge
I have checked everywhere looking for a solution to this, and have not been
I have checked other solutions to this problem and none have worked for me.
Possible Duplicate: Using ApplicationSettings to store Checked property for WinForms RadioButtons I have three
First of all, I have searched and read similar threads and I have tried
This probably looks like a duplicate but I don't think so. I have already
first I have checked that Server Authentication is already set to: SQL server and
First up: we are not doing TPH (table per hierarchy), that would make this
To access a remote database, I first have to use a program called Shrew
In order to bring up the menu for a DataGridViewComboBoxCell, I first have 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.