Welcome visitor
* Login
* Register
It is currently May 20th, 2019, 6:34 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  center an image in a frame
PostPosted: May 13th, 2010, 11:55 am 

Posts: 2
I have an image gallery that uses frames for navigation. All the images have different dimentions How can I horizontally center each image in the target frame?
Thanks


Top
 Profile  
 
  Re: center an image in a frame
PostPosted: May 14th, 2010, 4:46 am 
User avatar

Posts: 21
By default, if you place an image (or anything else) inside a table cell, it will be centered both vertically and horizontally. So , assuming you are placing each image inside a single page, you just need to place your image in a single-celled table that occupies the whole page. Like this:

<table border="0" width="100%" height="100%">
   <tr>
      <td><img src="imagefile.jpg" /></td>
   </tr>
</table>

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
  Re: center an image in a frame
PostPosted: May 14th, 2010, 6:05 am 

Posts: 2
I appreciate your thoughts. I was kind of hoping I could avoid making a page for each image and get away with somehow making the display frame centre the image each time.
Thanks again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron