Tips for organizing and centering Kendo radio buttons within a Bootstrap grid and form structure

After trying the Bootstrap method [3] without success, I am now implementing the radios according to approach [1]. Even after applying the fix for box-sizing as suggested in [2], it doesn't seem to resolve the issue.

<div class="panel panel-default">
    <div class="panel-heading">
        Insert heading here
    </div>
    <div class="panel-body">
        <div class="form-horizontal">
            <form > 
                <div class="form-group">
                    <label class="col-md-2">
                        Group name
                    </label>
                    <div class="col-md-9 col-md-offset-1">
                        <div class="form-group fix-kendo-sizing">
                            <input type="radio" id="causeRadio1" class="k-radio" name="fieldName" checked="">
                            <label class="k-radio-label" for="causeRadio1">Label value 1</label>
                        </div>
                        <div class="form-group fix-kendo-sizing">
                            <input type="radio" id="causeRadio1" class="k-radio" name="fieldName" checked="">
                            <label class="k-radio-label" for="causeRadio1">Label value 2</label>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

Attached are :

<link href="@Href("~/Content/bootstrap.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/Content/kendo/2014.3.1119/kendo.common-bootstrap.min.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/Content/kendo/2014.3.1119/kendo.bootstrap.min.css")" rel="stylesheet" type="text/css"/>
<link href="@Href("~/Content/bootstrap-kendo-fix.css")" rel="stylesheet" type="text/css"/>

The content of bootstrap-kendo-fix.css is

.form-control.k-widget
{
    padding: 0;
}

.fix-kendo-sizing,
.fix-kendo-sizing input {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

Appreciate any assistance!

References:

Answer №1

Appreciate the help with the links, I was facing the same issue and managed to resolve it using your code along with some css troubleshooting:

The style .k-radio has a property of display:none. The visible radio button is actually styled in .k-radio-label:before and .k-radio-label:after.

Modifying the selector to

.fix-kendo-sizing, .fix-kendo-sizing label::before
did the trick for me.

My updated bootstrap-kendo-fix.css now looks like this:

.form-control.k-widget
{
    padding: 0;
}

.fix-kendo-sizing,
.fix-kendo-sizing label::before {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

To further enhance the alignment of my label, I adjusted its line-height:

.k-radio-label {
        line-height:inherit;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Designing a dynamic patterned backdrop that seamlessly extends for a column in bootstrap

Experiencing some difficulties with Bootstrap and creating a resizable column background. In one row, there is a column with a fluid image at the top, another column below it with a CSS class that gives it a repeating background along the Y axis, and fina ...

How can I prevent scrolling in a Vue mobile menu?

In this scenario, the toggle for the menu is controlled by a checkbox with the id "check" below. I attempted to bind v-bind:class="[{'antiscroll': checkboxValue}]" to the body in HTML, and also in the main App.vue file, but it did not work as exp ...

How to preselect a value in a select tag in Angular 8

I am looking to assign a default value to a select tag, with the values being declared in a table within my component and displayed using the ngFor directive: <form> <div class="form-group col-4"> <span class="badge badge-theme m ...

The input field will display a border when it is actively selected

I am currently designing a form where the label should be positioned on the top border line of the text box. [![enter image description here][1]][1] Here is the code snippet: <div class="container"> <div class="row"> ...

Utilizing Google Chrome Developer Tools for JQuery console debugging

Just started using jQuery and was expecting to see [<li>my name</li>, in the Google Chrome console but got: [li, prevObject: r.fn.init(1)] 0 : li length : 1 prevObject : r.fn.init(1) proto : Object(0) <html> ...

What is the best way to compare two CSS files and selectively replicate just the discrepancies?

Is there a way to compare and copy different information from CSS files into another file? For instance, if I have two CSS files named a.css and b.css, is there a method to automatically select and copy only the differences between the two files? Thank y ...

When using jQuery with a large selectbox, you may encounter the error message: "Uncaught RangeError: Maximum

My select box works fine in IE and Mozilla, but throws an uncaught rangeError in Chrome when choosing the "Others" option to display a second select box with over 10k options. How can I diagnose and resolve this issue? <!DOCTYPE html> ...

Guide on adding an image to a Bootstrap card component

I'm facing a simple issue that I can't seem to solve. As a beginner in using bootstrap, I'm struggling to figure out how to insert an image into the card header. I've been searching online for solutions for the past 30 minutes with no l ...

Enhance the visual appeal of your website by incorporating a dazzling sparkle effect using

I have implemented the magnificPopup script on my gallery page. Check out magnificPopup on Github In addition, I have added a sparkle effect using this script: Try out the Sparkle Effect Currently, the sparkle effect only appears when hovering over eac ...

Update the content of a div and refresh it when a key on the keyboard is pressed

I need to hide the images in a div when I press a key on the keyboard. How can I achieve this? <div> <span role="checkbox" aria-checked="true" tabindex="0"> <img src="checked.gif" role="presentation" alt="" /> ...

Difficulty with HTML Bootstrap 3 including active class in UL LI elements

Struggling to implement scroll-spy for adding an active class to the ul li elements on a one-page scroll with a sticky nav. For some reason, I can't seem to get it to work within my project. Below is the menu structure: <body id="page-top&quo ...

The alignment of unordered lists can be modified

Having a bit of an issue with positioning/resizing UL lists. I have <li> tags with varying heights but the same width. I want to adjust their position so there is no blank space between them when resizing the window, ensuring they are always close t ...

Modify only the visual appearance of a specific element that incorporates the imported style?

In one of my defined less files, I have the following code: //style.less .ant-modal-close-x { visibility: collapse; } Within a component class, I am using this less file like this: //testclass.tsx import './style.less'; class ReactComp{ re ...

Step-by-step guide on displaying a checkbox list based on the selected option in a drop-down menu

Apologies for the lackluster title. My goal is to create a dynamic checklist based on selections made from a drop-down menu: The drop-down menu offers several options, and when a choice is made, I want a corresponding checklist to appear below it with dep ...

Expand your sidebar: tips to maximize its vertical potential

I am currently in the process of creating a sidebar using CSS flexbox and I am trying to make it expand vertically to cover the entire screen height. Here is an outline of what I have so far. Check out my JSFiddle example here .app { display: flex; f ...

Using HTML and JavaScript to add variables into the URL within the window.location

I have been struggling to incorporate longitude and latitude into the URL. Despite researching various topics online, I have not found a solution that works for me. Below is the HTML code that showcases the issue. When you click the "Show Position" button ...

Retrieve a collection of CSS classes from a StyleSheet by utilizing javascript/jQuery

Similar Question: Is there a way to determine if a CSS class exists using Javascript? I'm wondering if it's possible to check for the presence of a class called 'some-class-name' in CSS. For instance, consider this CSS snippet: & ...

What steps can I take to unite these two elements?

I'm having trouble adjusting the spacing between the #bigimage and #textarea elements while keeping them centered as a col-12 on small screens. Do you think using a media query would solve this issue? I attempted to place them in a separate container ...

Is there a way to hide an image once my scrollable div has reached a specific height?

I'm currently working on a project that involves a scrollable div with arrows above and below. My goal is to have the arrow above only appear after the div has reached a certain height. Below is the code I've been using... $("#scrolldivup").hid ...