Wednesday, 15 August 2012

css - CakePHP & Bootstrap - date field layout -


I start with both Bootstrap and Cake PHP 2.x. I baked my thoughts but there is a problem with the date field layout. The scene looks like this

  & lt; Div class = "form-group" & gt; & Lt ;? Php echo $ this- & gt; Form- & gt; Input ('booking_date', array ('class' => 'form-control', 'placeholder' = & gt; 'booking date')) ;; & Gt; & Lt; / Div & gt;  

But the problem is that the KPHP selects three from a date field, which is all 100% width, which corrupts the form and the fields look like this, while it has selected three Should be side-by-side:

see

apparently As such, bootstrap 2 had classes for small selections, but Bootstrap 3 does not do anymore. Any idea how it should look like it should?

In the date kppp for input of type you div < Using the / code> option, standard tags can not wrap each selected element, but there are 3 options that can handle it - between, separator and later on is the example that selects your inline. is.

  & lt; Div class = "form-group" & gt; & Lt ;? Php echo $ this- & gt; Form- & gt; Input ('booking_date', array ('class' = & gt; form-control', 'placeholder' = & gt; 'booking date', 'div' = & gt; array ('class' => Form-inline '),' between '= & gt;' & lt; div class = "form-group" & gt; ',' separator '= & gt;' & lt; / div & gt; & lt; Div class = "form-group"> after ',' followed by '= & gt;' & lt; / div & gt; '));) ;? & Gt; & Lt; / Div & gt;  

If you use the bootstrap grid, you can get better results by using classes to select it inline.


No comments:

Post a Comment