Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

HTML5 Center

I have a page with a panel within a panel. I want the inside iframe to be a specific width but to be center aligned on the page. I have tried numerous things, but below is my latest attempt. However, the panel displays flush left on the screen.

<div style="text-align:center;width:100%;">
<asp:Panel ID="panIframe" style="position: relative;width:835px; height:542px;" runat="server">
<iframe id="SCO" name="" style="width: 100%; height: 100%;"></iframe>
</asp:Panel>
</div>

Open in new window


Truth of the matter is, the below WORKS! But gives me squiggle messages in VS2012 that <center> is not supported in HTML5.
<center>
<asp:Panel ID="panIframe" style="width:835px; height:542px;" runat="server">
<iframe id="SCO" name="" style="width: 100%; height: 100%;"></iframe>
</asp:Panel>
</center>

Open in new window


How do I get the panel to center on the width of the page and be supported in HTML5?

thanks!
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Starr Duskk

ASKER

Well, of course! Because margin:0 auto;  is so clearly indicating that it is going to center it! LOL

Guess that's why I need the experts!

thanks!