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 !