problem centering element, using css

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?
 
M

miher

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top