html - Adding image to login page in cakephp -


i'm creating login page in cakephp. instead of writing "login", thought of showing image. how tried:

<br> <div class="index large-4 medium-4 large-offset-4 medium-offset-4 columns">     <div class="panel">         <h2 class="text-center"><img src="img/cake.icon.png" /></h2>         <?= $this->form->create(); ?>             <?= $this->form->input('email'); ?>             <?= $this->form->input('password', array('type' => 'password')); ?>             <?= $this->form->submit('login', array('class' => 'button')); ?>         <?= $this->form->end(); ?>     </div> </div> 

in above layout, tried add image logo.png instead of showing "login". but, image did not load. i've placed image in webroot/img/logo.png. but, image not loading. what's wrong this? should change or add?

you should refer document: htmlhelper::image

try this:

<h2 class="text-center">   <?php echo $this->html->image('logo.png'); ?> </h2> 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -