Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/05/2014, 14:24
leoncito34
 
Fecha de Ingreso: junio-2008
Mensajes: 82
Antigüedad: 15 años, 10 meses
Puntos: 2
Enviar una imagen y que quede Centrada y el texto debajo

no puedo centrar una imagen .. me alinea a la izquierda o derecha y yo quiero que me quede centrada y el texto debajo ... manualmente tengo que darle estos parametros

Código HTML:
Ver original
  1. img style="vertical-align: middle; display: block; margin-left: auto; margin-right: auto;"

en las lineas 29 y 30 se ve las opciones que tengo para seleccionar.. izquierda y derecha

Código PHP:
Ver original
  1. <form action="index.php?option=com_media&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>" id="imageForm" method="post" enctype="multipart/form-data">
  2.     <div id="messages" style="display: none;">
  3.         <span id="message"></span><?php echo JHtml::_('image', 'media/dots.gif', '...', array('width' =>22, 'height' => 12), true)?>
  4.     </div>
  5.     <fieldset>
  6.         <div class="fltlft">
  7.             <label for="folder"><?php echo JText::_('COM_MEDIA_DIRECTORY') ?></label>
  8.             <?php echo $this->folderList; ?>
  9.             <button type="button" id="upbutton" title="<?php echo JText::_('COM_MEDIA_DIRECTORY_UP') ?>"><?php echo JText::_('COM_MEDIA_UP') ?></button>
  10.         </div>
  11.         <div class="fltrt">
  12.             <button type="button" onclick="<?php if ($this->state->get('field.id')):?>window.parent.jInsertFieldValue(document.id('f_url').value,'<?php echo $this->state->get('field.id');?>');<?php else:?>ImageManager.onok();<?php endif;?>window.parent.SqueezeBox.close();"><?php echo JText::_('COM_MEDIA_INSERT') ?></button>
  13.             <button type="button" onclick="window.parent.SqueezeBox.close();"><?php echo JText::_('JCANCEL') ?></button>
  14.         </div>
  15.     </fieldset>
  16.  
  17.     <iframe id="imageframe" name="imageframe" src="index.php?option=com_media&amp;view=imagesList&amp;tmpl=component&amp;folder=<?php echo $this->state->folder?>&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>"></iframe>
  18.  
  19.     <fieldset>
  20.         <table class="properties">
  21.             <tr>
  22.                 <td><label for="f_url"><?php echo JText::_('COM_MEDIA_IMAGE_URL') ?></label></td>
  23.                 <td><input type="text" id="f_url" value="" /></td>
  24.                 <?php if (!$this->state->get('field.id')):?>
  25.                     <td><label for="f_align"><?php echo JText::_('COM_MEDIA_ALIGN') ?></label></td>
  26.                     <td>
  27.                         <select size="0" id="f_align" >
  28.                         <option value="" selected="selected"><?php echo JText::_('COM_MEDIA_NOT_SET') ?></option>
  29.                             <option value="left"><?php echo JText::_('JGLOBAL_LEFT') ?></option>
  30.                             <option value="right"><?php echo JText::_('JGLOBAL_RIGHT') ?></option>                      
  31.                            
  32.                            </select>
  33.                         </select>
  34.                     </td>
  35.                     <td> <?php echo JText::_('Alineación de la imagen');?> </td>
  36.                 <?php endif;?>
  37.             </tr>
  38.             <?php if (!$this->state->get('field.id')):?>
  39.                 <tr>
  40.                     <td><label for="f_alt"><?php echo JText::_('COM_MEDIA_IMAGE_DESCRIPTION') ?></label></td>
  41.                     <td><input type="text" id="f_alt" value="" /></td>
  42.                 </tr>
  43.                 <tr>
  44.                     <td><label for="f_title"><?php echo JText::_('COM_MEDIA_TITLE') ?></label></td>
  45.                     <td><input type="text" id="f_title" value="" /></td>
  46.                     <td><label for="f_caption"><?php echo JText::_('COM_MEDIA_CAPTION') ?></label></td>
  47.                     <td>
  48.                         <select size="1" id="f_caption" >
  49.                             <option value="" selected="selected" ><?php echo JText::_('JNO') ?></option>
  50.                             <option value="1"><?php echo JText::_('JYES') ?></option>
  51.                         </select>
  52.                     </td>
  53.                     <td> <?php echo JText::_('COM_MEDIA_CAPTION_DESC');?> </td>
  54.                 </tr>
  55.             <?php endif;?>
  56.         </table>
  57.  
  58.         <input type="hidden" id="dirPath" name="dirPath" />
  59.         <input type="hidden" id="f_file" name="f_file" />
  60.         <input type="hidden" id="tmpl" name="component" />
  61.  
  62.     </fieldset>
  63. </form>