I'm trying to use a Bootstrap checkbox in a C# ASP.NET MVC generated web page.
The box is supposed to display the checkbox, with a label of "admin" to the right of it. But when it displays on the page, it looks like this:
I've been digging through Bootstrap .less files and just can't see where this problem is coming from. Anyone hit it before?
Bootstrap Checkbox problem
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Bootstrap Checkbox problem
It looks to me like there is an errant margin in there somewhere, maybe a left one.
Use Chrome Developer Tools to drill into what CSS rules are affecting it (Ctrl+Shift+J >> Elements tab >> select the markup of the checkbox >> Styles window on the right) and then work backwards into VS to find the rule where you can edit it.
Use Chrome Developer Tools to drill into what CSS rules are affecting it (Ctrl+Shift+J >> Elements tab >> select the markup of the checkbox >> Styles window on the right) and then work backwards into VS to find the rule where you can edit it.
The indelible lord of tl;dr
Re: Bootstrap Checkbox problem
Apparently it's an issue with Bootstrap 3.2.0. I went back to 3.1.1 and the problem went away.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Bootstrap Checkbox problem
Interesting. I would still assume it would be a CSS issue that could be resolved, though. But rolling-back and moving on may be your best bet.
The indelible lord of tl;dr
Re: Bootstrap Checkbox problem
Looking through CSS compiled from SCSS is a nightmare. You need to look at the SCSS source and use compass to compile it to CSS.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: Bootstrap Checkbox problem
I hit this while following along with some video tutorials, so a rollback is easiest. If it was my own project I'd probably dig into it and see what was up.Jackolantern wrote:Interesting. I would still assume it would be a CSS issue that could be resolved, though. But rolling-back and moving on may be your best bet.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Bootstrap Checkbox problem
One of the BIGGEST pit falls to bootstrap is all the changes they have done. We use to use span but then they change them to col-md-4 and all that which destroyed sites. Everyone had to migrate. I still haven't migrated some of my sites. Doing it slowly. So I often stay away from the latest releases of bootstrap.
Re: Bootstrap Checkbox problem
Refactoring Halls! In Netbeans you press ctrl+r and it does the rest for you
Fighting for peace is declaring war on war. If you want peace be peaceful.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Bootstrap Checkbox problem
this week is one of those weeks where I answer everything in images.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm