Skip to content

Commit abe9023

Browse files
author
Dimo Dimov
committed
Add form-control Bootstrap docs
1 parent 71c1b2d commit abe9023

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

using-kendo-with-twitter-bootstrap.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ The following example demonstrates the necessary links to these stylesheets (rep
1717
<link rel="stylesheet" href="http://cdn.kendostatic.com/VERSION/styles/kendo.common-bootstrap.min.css">
1818
<link rel="stylesheet" href="http://cdn.kendostatic.com/VERSION/styles/kendo.bootstrap.min.css">
1919

20-
While these files will ensure that Kendo UI looks a lot like Bootstrap, it is not mandatory to use them. The default Kendo UI common.css and any other theme will style the widgets differently, but they will continue to function properly.
20+
While these files will ensure that Kendo UI looks a lot like Bootstrap, it is not mandatory to use them.
21+
The default Kendo UI common.css and any other theme will style the widgets differently, but they will continue to function properly.
2122

2223
## Using the responsive features of Bootstrap
2324

24-
Using the responsive features of Bootstrap does not differ from other responsive sites; refer to the help topic on [how to use Kendo UI in responsive web pages](./using-kendo-in-responsive-web-pages).
25+
Using the responsive features of Bootstrap does not differ from other responsive sites;
26+
refer to the help topic on [how to use Kendo UI in responsive web pages](./using-kendo-in-responsive-web-pages).
2527

2628
## Using a customized version of Bootstrap
2729

28-
If you have customized the colors of Bootstrap before using it, and need Kendo UI to match the newly chosen colors, you will need to customize Kendo UI's bootstrap theme through the [Kendo UI ThemeBuilder](http://demos.telerik.com/kendo-ui/themebuilder/web.html).
30+
If you have customized the colors of Bootstrap before using it, and need Kendo UI to match the newly chosen colors,
31+
you will need to customize Kendo UI's bootstrap theme through the [Kendo UI ThemeBuilder](http://demos.telerik.com/kendo-ui/themebuilder/web.html).
2932

3033
## Nesting Kendo UI widgets and Bootstrap Grid layout
3134

@@ -35,7 +38,7 @@ forcing us to override the Bootstrap CSS and reapply the `content-box` box model
3538
will not work as expected. In general, multiple level nesting of the two products is bound to break the one that is on the inside, unless an additional CSS rule is used for each new level of nesting.
3639

3740
A possible easy workaround is to override the Bootstrap CSS, apply `content-box` box model to all elements on the page and use a `border-box` box model only to selected Bootstrap elements, which need it
38-
(these are all `.col-...` classes, `.row`, `.container` and `.container-fluid`). You can add the following CSS rules **after** the Bootstrap and Kendo UI stylesheets.
41+
(these are all `.col-...` classes, `.row`, `.container`, `.container-fluid` and `form-control`). You can add the following CSS rules **after** the Bootstrap and Kendo UI stylesheets.
3942

4043
/* reset everything to the default box model */
4144

@@ -107,3 +110,14 @@ A possible easy workaround is to override the Bootstrap CSS, apply `content-box`
107110
-moz-box-sizing: border-box;
108111
box-sizing: border-box;
109112
}
113+
114+
## Using the form-control Bootstrap CSS class with Kendo UI widgets
115+
116+
The `form-control` Bootstrap CSS class is normally added to textboxes in order to apply some border, padding, background and font styles.
117+
The problem is that some Kendo UI widgets copy the custom CSS classes of their originating `<input>` elements to the widget wrapper element.
118+
This results in an incorrect padding style applied to a widget element that should not have a padding. The resolution is to use:
119+
120+
.form-control.k-widget
121+
{
122+
padding: 0;
123+
}

0 commit comments

Comments
 (0)