Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

form-check-inline crashes with form-check-custom


Hi,

If I used form-check-inline with form-check-custom together, the inline effect disappeared, please help check, thanks.

e.g.


<div class="form-group form-check form-check-custom form-check-solid form-check-inline mb-3">
<input type="checkbox" name="strategy[source][social_media][]" value="facebook" id="strategy-source-social-media-facebook" class="form-check-input"><label class="form-check-label" for="strategy-source-social-media-facebook">Facebook</label>
</div>


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

I come up a solution which no need alter html structure:


.form-check-custom.form-check-inline {
display: inline-block;
margin-right: 1rem;
}


Maybe take this reference for future development.

Thanks.



Hi happy,

Great workaround. We will add it in the next update as:


// Inline
.form-check-custom {
&.form-check-inline {
display: inline-block;
margin-right: $form-check-inline-margin-end;
}
}


Regards.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

Hi,

Please try to use below markup to have inline checkboxes:


<div class="d-flex align-items-center gap-5">
<div class="form-group form-check form-check-custom form-check-solid">
<input type="checkbox" name="strategy[source][social_media][]" value="facebook" class="form-check-input"/>
<label class="form-check-label" for="option-1">Option 1</label>
</div>

<div class="form-group form-check form-check-custom form-check-solid">
<input type="checkbox" name="strategy[source][social_media][]" value="facebook" class="form-check-input"/>
<label class="form-check-label" for="option-2">Option 2</label>
</div>
</div>


If you need any further clarifications please let us know.

Regards.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(