RSS

Tag Archives: alignment

[Additional divs in CakePHP]HTML elements horizontal and vertical alignment issue

In cakePHP, the form fields, buttons and links get messed up with a variation of few pixels and the alignment issue couldn’t get fixed through element inspection and additional divs are noticed in the view source of web page. Tried re-structuring, re-styling etc but the issue remains consistent. Then this post is for you. There is a two word fix for it simply add ‘div’=>false to avoid additional div wrapping around html elements.

e.g. <?php echo $this->Form->button(‘Submit’, array(‘type’ => ‘submit’,’class’=>’grey’,’div’=>false)); ?>

This additional div wrapping is an overhead, I felt so far, in a way to customized design. So make sure to add this ‘div’=>false, in your checklist of design debugging in cakephp. All the best with coding in cake :).

Advertisements
 
Leave a comment

Posted by on November 20, 2013 in cakephp

 

Tags: , , , ,

 
%d bloggers like this: