lokesh-coder / pretty-checkbox

A pure CSS library to beautify checkbox and radio buttons.
https://lokesh-coder.github.io/pretty-checkbox/
MIT License
1.81k stars 151 forks source link

Issue with displaying checkbox in Bootstrap 3 #71

Open dugajean opened 5 years ago

dugajean commented 5 years ago

I'm using this checkbox library and it looks proper in some places, and in some others it looks unaligned for some reason which I can't figure out. I'm using Bootstrap 3 in my project and whenever I use a checkbox in a .row/col-* I get issues.

This is how it looks like:

Checkbox1

Checkbox2

As you can see, they shift upwards somehow. I tried debugging the CSS, but I can't figure it out.

lokesh-coder commented 5 years ago

Hi @dugajean, can you provide some sample code. It would be helpful for me to understand the issue

dugajean commented 5 years ago

I'm not sure what to provide exactly, so here's the HTML for the first image above:

<div id="app" class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="header">
                        <h4 class="title">Details</h4>
                    </div>
                    <div class="content">
                        <form method="POST" action="http://localhost/payments" accept-charset="UTF-8">
                            <div class="pretty p-icon p-curve">
                                <input name="paid" type="checkbox" value="1">
                                <div class="state"><i class="icon fa fa-times"></i>
                                    <label>Has the patient paid?</label>
                                </div>
                            </div>
                            <input type="submit" value="Save Changes" class="btn btn-primary btn-fill pull-right">
                            <div class="clearfix"></div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
lokesh-coder commented 5 years ago

I couldn't reproduce the issue. I tried in codesandbox, seems working fine.

https://myciz.codesandbox.io/

dugajean commented 5 years ago

I'll provide some more appropriate code shortly.