Welcome Guest, Not a member yet? Register   Sign In
Mmm, Helper HTML Problem with alt tag?
#1

[eluser]woomacoder[/eluser]
Hello!

I have a little problem with img() function of HTML_HELPER.

for example:

img($row->image, $row->title);

$row->title is the alt tag of image; but... the output is:

<img src="http://domain.com/images.png" />

without alt flag!
Where is the problem? Internal bug of CI?
#2

[eluser]Thorpe Obazee[/eluser]
the prototype is

Code:
img('images/picture.jpg');

or if you want to have 'alt', use:

Code:
$image_properties = array(
          'src' => 'images/picture.jpg',
          'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',
          'class' => 'post_images',
          'width' => '200',
          'height' => '200',
          'title' => 'That was quite a night',
          'rel' => 'lightbox',
);

img($image_properties);

with the alt property being, 'Me, demonstrating how to eat 4 slices of pizza at one time'.




Theme © iAndrew 2016 - Forum software by © MyBB