Cheryl and Michael,
First, I want to thank you both for your help. The .alignCenter class did
not have a width attribute set, although a parent <div> did. I set the width
in .alignCenter and set margins to "0 auto", but it still did not work in
FireFox (works fine in IE7).
I tried your suggestion, Michael, and set align="center" and that *did*
work, but it was flagged as deprecated code and suggested I use another
construct.
All of those .ct100_Menu... classes are created at runtime when the page is
rendered, so I have no way to control them independently. The only thing that
I put on the page is the asp.net Menu control with a web.sitemap file to
populate the buttons. There are a *ton* of tags associated with the Menu
control, but I haven't been able to find one that will center the menu in a
<div>.
As I stated in a previous post, ALL those tables are created when the page
is rendered on the server. I coded none of that. The same is true for all the
other tables on the page as well. Those are the result of using asp.net
GridView controls connected to a database.
I did manage to get the second menu to work in FireFox by removing the width
attribute in .alignCenter and assigning fixed left and right margins of 120px
and 130px respectively. (works in this case but would not work on a
variable-width page) I'm beginning to think that using DHTML menus is a
better choice for now, at least until I learn enough asp.net programming to
take advantage of the dynamic aspects of Menu controls.
Thanks again for your help,
Ed
Post by Michael DeHaanOkay try this: in the .ctl00_Menu2_2 class add margin: auto;
This should have the effect of putting 50% space on either side of the block
containing the 5 buttons which use the above class.
You could also be specific with margin-left: auto; margin-right: auto;
Post by Ed FrazierThanks for the reply Michael,
I do have a class called .alignCenter defined in the external style sheet.
The only element in it is margin: 0 auto;, but it didn't solve the problem.
And the only FrontPage code in there should be an include, used for the
footer menu. From reading other posts here, includes are not really FP server
side code so should be OK to leave in.
Since writing this post yesterday, I've done some research on asp.net
controls and it seems that most asp.net controls such as the menu control,
grid control and others are rendered as tables when the page is called. It
seems a bit odd that we go to all this trouble to make a page without tables,
and then Microsoft takes what we've written and turns it back into tables. Go
figure... If you look at the source for that page, it is full of tables, but
my code does not include a single one, anywhere.
There does seem to be a workaround of sorts, using something called asp.net
2.0 CSS Control Adapters (http://www.asp.net/CSSAdapters/WhitePaper.aspx) to
instruct asp.net to generate CSS rather than tables, but I haven't had time
to do much more than read the description of their use.
Thanks again for taking a look,
Ed
Post by MichaelI notice that you have this code at the 2nd menu area. <div
class="alignCenter">
I think what you were trying to do or might try is <div align="center">
I didn't see a class called alignCenter in your css or html.
align is not the best way to handle but you also have some FrontPage code
that will need to be rewritten in the future also.
Post by Ed FrazierI've been working all morning, trying to get as asp.net menu control to
center on my page (http://admin.renegadesprints.org/jan_28.aspx). There are
two menu contorls on the master page. The second one is the one I'm having
problems with.
It is centered when viewed in IE7, but in FireFox it is left justified. I've
tried putting it inside a div, inside an asp.net panel and also just wrapping
it in <p> elements and using text-align=center, but nothing seems to word
when viewed from FireFox.
Any suggestions?
Thanks,
Ed