0

I can't find how a make this a link to my image in CakePHP:

  <img src="img/default.png" width="130" style="position: absolute; top: 0px; left: 0px; z-index: 3; opacity: 0; ">



$html->image('default.png').....????;

Many Thanks!

2 Answers 2

8

You need to add the following to the options array:

'url' => array('controller' => '..' 'action' => '..')

i.e.

$this->Html->image('default.png', array('url' => ..));

There's more information in the documentation

Sign up to request clarification or add additional context in comments.

2 Comments

Read the docs, it's as simple as adding 'style' in the options array.
@NDeveloper - if you "mean the style of the image", you should reference that somewhere in your question. As it stands, Dunhamzzz has answered the question you asked.
0

echo $this->Html->image(BASE_URL."images/plus.jpg",array("alt" => 'add fields',"id"=>"add_more","height"=>40,"width"=>40));

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.