Closed dwelford closed 10 years ago
You should not control spacing with html. That's not a good practice. An alternative would be to assign a class or id to the button and control spacing through css. Just like you said, another way is to use btn-toolbar. There is a BMVC helper for that:
@using (Html.Bootstrap().Begin(new ToolBar()))
{
}
Currently I have '''@using (var g = Html.Bootstrap().Begin(new ButtonGroup())) { @g.Button().Style(ButtonStyle.Info).Value("Save").Text("Save").Size(ButtonSize.Large).Tooltip(new Tooltip("Click to Save Record").Placement("bottom")) @g.Button().Text("Cancel").Value("cancel").Size(ButtonSize.Large).Style(ButtonStyle.Danger).HtmlAttributes(new { onclick = string.Format("window.location.href='{0}';", Url.Action("Index")) }) } '''
It would be nice to have @g.Button().Spacer("number of spaces") to apply a gap between the buttons I know the btn-toolbar could be used but I can't find it in the BootStrap.
Just a thought
Thanks