TwitterBootstrapMvc icon indicating copy to clipboard operation
TwitterBootstrapMvc copied to clipboard

Tabs.Position

Open AlonCG opened this issue 11 years ago • 7 comments

Hello, I am trying to set the position on a tab ... I would like them to be on the left.

I am using BootStrap 3, and there does not seem to be a "Position" setting on the Tabs class. I am defining the tabs as such:

var tabs = Html.Bootstrap().Begin(new Tabs("registerClientTabs"))

What am I doing wrong? How can I get the tabs on the left?

Thanks!

AlonCG avatar Jan 27 '14 15:01 AlonCG

I could not find a way to set position for the tabs in the Bootstrap docs. If I'm missing it, please show a link. Otherwise - this feature is not supported by Bootstrap itself.

DmitryEfimenko avatar Jan 28 '14 04:01 DmitryEfimenko

I will take a look, the idea came from your documentation, I did not think that maybe your docs were wrong ☺ … Class Tabs has following extension methods: ... .Position(Direction.Left) Sets position of the tabs. … Apparently, this functionality has been removed from Bootstrap 3. Though there is a bunch of CSS that can be implemented ☹

http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3

AlonCG avatar Jan 28 '14 06:01 AlonCG

Indeed there might be some discrepancies in my docs. I'll make sure to update it.

DmitryEfimenko avatar Jan 28 '14 06:01 DmitryEfimenko

That is OK, I guess I have been relying on this more than I should when it comes to putting in my bootstrap code. I can add this CSS (also here, https://gist.github.com/lavoiesl/6610753) to my application, but would be nice to have an elegant way to assign it to the Tabs. Maybe you can do something like you did with the "TypeAhead" component? Offer the ability to add back Tab positioning if the additional CSS is added by the developer? Ideas?

AlonCG avatar Jan 28 '14 06:01 AlonCG

good suggestion. I'll do that.

DmitryEfimenko avatar Jan 28 '14 06:01 DmitryEfimenko

Awesome! I am attempting it now ... and will let you know if this will be trivial or not ... it is possible that a form group inside the tabs may be a bit sketchy, so I will update you on my progress.

AlonCG avatar Jan 28 '14 07:01 AlonCG

This may not be worth the effort?

Ok, while I am able to use the suggestion from SO (and the gist less) to get tabs where I want them ... of course it messes with the form containers and I get a lousy, chopped up, and crazy looking forms.

2014-01-28 11_08_21-e-tabs dashboard designer

I will spend a little more time trying to figure out a solution, but would take any suggestions that you have. Maybe I should re-arrange the way I have the form nested ... code layout is: -Bootstrap.Begin New Form --Bootstrap.Begin New Tabs ---BeginPanel ----Form.FormGroup ---BeginPanel ----Form.FormGroup --End Using Tabs -End Using Form

(May just use the "Pills" if that is already built in!)

AlonCG avatar Jan 28 '14 09:01 AlonCG