problem centering element, using css

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

asp.net 3.5

This markup does not horizontally center the menu control. I've tested it in
IE7, doubt it work in Opera etc..
I want it to be horizontally centered

What I think is the reason it's not horizontally centered is that there is
no width on the <mb:Menu ID="Menu1" runat="server" /> element. So css don't
know how much space to put on each side etc... But I don't know the width

<div style="background-color:#3399FF; margin-left:auto; margin-right:auto;
padding-bottom:5px; padding-top:5px;">
<mb:Menu ID="Menu1" runat="server" />
</div>

any suggestions?
 
Hi,

I have faced something similar, and putting the mentioned element into an
other div, and setting alignment in the 'outer' div
worked for me, however i don't know if it is applicable in Your case.

Hope You find this useful.
-Zsolt
 
Back
Top