May 04, 2012, 2:22 AM
[CLOSED] Center align panel in container
This a probably a stupid question but anyway...
I have a tab panel that contains 3 panels each of which has a MaxWidth set - this is working fine and as expected. Now I want to make sure that the panels are horizontally centered within the containing tab panel in cases where the width of the tab panel is much greater than the max width of the child panels (obviously the default is for them to be left aligned). how can I achieve this?
I have a tab panel that contains 3 panels each of which has a MaxWidth set - this is working fine and as expected. Now I want to make sure that the panels are horizontally centered within the containing tab panel in cases where the width of the tab panel is much greater than the max width of the child panels (obviously the default is for them to be left aligned). how can I achieve this?
items.Add(Html.X().TabPanel()
.ID("pnlServiceDetailsContainer")
.AnchorHorizontal("100%")
.Items(cnt =>
{
cnt.Add(Html.X().Panel()
.Title("Basic Service Details")
.Items(sub =>
{
sub.Add(Html.X().Container()
.ItemsFromPage(this, "/Views/Shared/_BasicServiceDetailsPanel.cshtml"));
//sub.Add(Html.X().Container()
// .ItemsFromPage(this, "/Views/Shared/_PlaceDetailsPanel.cshtml"));
}));
cnt.Add(Html.X().Panel()
.Title("Contract Details")
.ItemsFromPage(this, "/Views/Shared/_ContractDetailsPanel.cshtml"));
cnt.Add(Html.X().Panel()
.Title("Pricing Details")
.ItemsFromPage(this, "/Views/Shared/_RecurringChargesPanel.cshtml"));
}));
Last edited by Daniil; May 08, 2012 at 11:34 AM.
Reason: [CLOSED]