I've got panels containing tables to organize textboxes/labels, and I'd like to center them, but I can't figure out what attribute to use. I've tried to justify them in the design view, and horizontalalign:center in h开发者_运维技巧tml, but to no avail. What's the best way to center panels containing tables?
I would apply CSS to them:
div.myPanelCss
{
margin-left: auto;
margin-right: auto;
}
I believe Panels render as a div
You can generally center a table by using margin: auto;
.
Apply the following CSS rule for your panel (surrounding div would work):
.centerPanel
{
margin 0 auto;
}
精彩评论