• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
img helper, img tag and position of an image


the img helper and the relative image tag do not support attribute like align="center". Also the div align="center" has been deprecated.

How should some one set an image on a side of the screen without use the px esplicit expression?

I put here this discussion to know if there is another solution that use some helper for other tags.

You describe the problem, but could you please explain further what you are trying to accomplish?

This is CSS dude, not CI, nor even HTML.
Set "text-align : center;" on the parent div.

The answer is in the html and css, the question can be also set in codeigniter as the image helper do not provide the position of an image.

Just set a tag

<center> &lt;?php echo img(...) ?&gt; </center>


The <center> tag is not supported in HTML5, and is deprecated in HTML 4.01. But yes it should work.
I maintain you should use some CSS.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.