Bootstrap Checkbox problem

C++, C#, Java, PHP, ect...
Post Reply
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Bootstrap Checkbox problem

Post by OldRod »

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:

Image

I've been digging through Bootstrap .less files and just can't see where this problem is coming from. Anyone hit it before?
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Bootstrap Checkbox problem

Post by Jackolantern »

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.
The indelible lord of tl;dr
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Bootstrap Checkbox problem

Post by OldRod »

Apparently it's an issue with Bootstrap 3.2.0. I went back to 3.1.1 and the problem went away.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Bootstrap Checkbox problem

Post by Jackolantern »

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
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Bootstrap Checkbox problem

Post by Chris »

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.
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Bootstrap Checkbox problem

Post by OldRod »

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.
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.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Bootstrap Checkbox problem

Post by hallsofvallhalla »

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.
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Bootstrap Checkbox problem

Post by Chris »

Refactoring Halls! In Netbeans you press ctrl+r and it does the rest for you :D
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Bootstrap Checkbox problem

Post by hallsofvallhalla »

Image

this week is one of those weeks where I answer everything in images.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Bootstrap Checkbox problem

Post by Jackolantern »

I have had those kinds of weeks before :P
The indelible lord of tl;dr
Post Reply

Return to “Coding”