Help with PHP, CSS so basic Im sure anyone would know.. help me

Discussion in 'HTML & Website Design' started by Gonefishing, Jul 19, 2012.

  1. #1
    Hi Guys I am a total noob with programming and yet I wanted to design a website.
    I got everything done up now.. i have a problem.. here's an image ...

    syxzmg.jpg
    As you can see the images are aligned to the top of the cell.. how can i make it aligned to the middle?

    here are some codes.


    }
     		if ($display_counter)
    	 		modBidsHelper::renderAuctionTiming($rows[$i]);
     		
     		?>
    
    	<tr class="<?php echo $alt_class;?>" onmouseover="this.className='<?php echo $alt_class;?>_hover'" onmouseout="this.className='<?php echo $alt_class;?>'">
    	  <?php if ($display_image) { ?>
    	      <td nowrap width="<?php echo $image_width+30;?>" height="<?php echo $image_height+10;?>" align="center"> 
    		      <?php /*<?php echo $i+1;??>. */?>
    		     		      <img src="<?php echo $image;?>" border="0" width="<?php echo $image_width;?>" height="<?php echo $image_height;?>" >
    	      </td>
    	  <?php } ?>
     		 <td>
     		 	<?php if (!$display_image) echo $i+1,'. ';?><a href="<?php echo $link_to_auction;?>" title="<?php echo $overlib_str;?>" ><?php echo $rows[$i]->title;?></a>
     		 </td>
     		 <?php if ($display_counter) { ?>
     		 <td>
    			<span id="modulebidstime<?php echo $mid;?>_<?php echo $i+1;?>"><?php echo $rows[$i]->countdown;?></span>
     		 </td>
     		 <?php 
     		 }
    PHP:

     
    Gonefishing, Jul 19, 2012 IP
  2. 3dy.ro

    3dy.ro Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    45
    #2
    Either use float:left on the image, or display: inline on both elements.

    If it is a table and you really want to align it to the middle of the cell (as you said in the first phrase below your image), you can use vertical-align: middle, but I doubt this is going to give you the result that you actually want.

    Good luck, though. If you give us the link to your live site it would be easier for us to help.
     
    3dy.ro, Jul 19, 2012 IP
  3. Bryan Zazz

    Bryan Zazz Peon

    Messages:
    34
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    personally I'd edit your $alt_class; as it seems that it controls your image layout. So check your CSS file which contains whatever
    "<?phpecho$alt_class;?>"
    points to, then edit that with something like:
    "vertical-align:middle"
    So in my view you must edit the image-container attribute, not the image itself, as that won't have any effect...
     
    Bryan Zazz, Jul 25, 2012 IP