bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

.form-group and .col-offset-* not working for Bootstrap 3

Open FrenchDilettante opened this issue 13 years ago • 15 comments

Hello,

I've been playing a bit with Bootstrap 3 for forms and spotted an issue. I thought my structure was wrong, but I can't get both .col-offset-* and .form-group working properly...

Here is a live example (in HAML, please excuse my laziness) http://cssdeck.com/labs/dzks2zzo

Basically, you can't apply a .col-offset-* because the .form-group margin overrides it (1st example). If you nest the .form-group into the .col-offset-*, the margin still shifts (2nd example).

FrenchDilettante avatar Jul 29 '13 12:07 FrenchDilettante

Translated to HTML, with latest CSS (180034a4b450fb4a6567d6dbaaeb680905d798c4): http://jsfiddle.net/GkJJL/4/

cvrebert avatar Jul 29 '13 19:07 cvrebert

Thank you :)

FrenchDilettante avatar Jul 30 '13 10:07 FrenchDilettante

Same issue here!

fguillen avatar Aug 03 '13 18:08 fguillen

i'm having the same problem :( any fixes ?

cfredmond avatar Aug 03 '13 23:08 cfredmond

I am also having this issue, offset does not work as if it is not included in the css file.

nickewansmith avatar Aug 04 '13 15:08 nickewansmith

There actually is no col-lg-offset-* it's just col-offset-*

Just discovered this looking into the CSS file and doing a find all.

Changing it fixes this issue.

jrdn91 avatar Aug 05 '13 01:08 jrdn91

Doable: http://jsfiddle.net/qv9TG/3/

cvrebert avatar Aug 05 '13 01:08 cvrebert

The issue remains for me, I don't know what I'm doing wrong:

With the actual Bootstrap 3 CSS that is available for download: http://jsfiddle.net/fguillen/KjJrs/

With the Bootstrap 3 CSS that is available through the CDN: http://jsfiddle.net/fguillen/NNgKw/

(You must make the "Result" frame bigger to see the effect)

The issue can be seen even in the Bootstrap documentation example of "Horizontal Form": http://getbootstrap.com/css/#forms-horizontal

fguillen avatar Aug 05 '13 11:08 fguillen

The short explanation is that it's fixed in git HEAD, and all 3 of those are outdated relative to it. Note the commit SHA in my fiddle.

cvrebert avatar Aug 05 '13 11:08 cvrebert

Thanks Jordan4jc, Solve it by using .col-offset-* instead .col-lg-offset-*

togepige avatar Aug 12 '13 16:08 togepige

The .col-offset-* instead of .col-lg-offset-* fix is okay temporarily, but the documentation indicates that it should be .col-(size)-offset-* and with .col-(size)-* being used you need some way to adapt the column offsets to various screen-sizes.

philiposborne avatar Aug 27 '13 14:08 philiposborne

Not sure if this needs to be re-opened, it doesn't seem to be in 3.2?

I've pasted 3.2 in here and the offsets are not applied http://jsfiddle.net/qv9TG/8/

There are no col-offset-# styles. When using col-md-offset-1 I can see the style is being overridden by form-group clearly, my current workaround is to add !important to all those offset styles

adam-marshall avatar Sep 05 '14 09:09 adam-marshall

All of those refer to blank 'for' attributes, I just quickly updated the fiddle in the thread above, so happily ignoring the snazzy auto comments

adam-marshall avatar Sep 05 '14 09:09 adam-marshall

@adam-marshall Looks the same to me on Mac Chrome. Be sure that your viewport is wide enough.

cvrebert avatar Sep 05 '14 10:09 cvrebert

Hi, yes I think that was my bad, thanks.

adam-marshall avatar Sep 09 '14 11:09 adam-marshall