SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Rome
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [CSS]Align and move image!

    OK folks,
    another small question from me
    I have to align some images(banner images) in a lateral section, so i do that:
    HTML Code:
    .banner{
    		margin-left: 5px;	
    	}
    by assigning the class to my images with a <div> :
    HTML Code:
    <tr>
    				<td background="images/layout/12.jpg">
    				<div class="banner">
    	
    				<a href="http://www.freewebs.com/hnd2/" target="_blank"><img alt="" src="affiliates/affiliate_hd2us.gif" width="88" height="31" border="0"></a>
    				<a href="http://www.hidden-and-dangerous2.com/" target="_blank"><img alt="" src="affiliates/affiliate_hd2gf.gif" width="88" height="31" border="0"></a>
    				<a href="http://hd2.bonusweb.cz/" target="_blank"><img alt="" src="affiliates/ikonka.gif" width="88" height="31" border="0"></a>
    				<a href="http://www.hd-hq.tk/" target="_blank"><img alt="" src="affiliates/iko_hd2_fansite.gif" width="88" height="31" border="0"></a>
    				<a href="http://www.3dactionplanet.com/hd/" target="_blank"><img alt="" src="affiliates/affiliate_hdfanatic.gif" width="88" height="31" border="0"></a>
    				<a href="http://www.hd2-pt.net/" target="_blank"><img alt="" src="affiliates/hadpt.gif" width="100" height="35" border="0"></a>
    				<a href="http://www.exposed-and-disarmed.com/" target="_blank"><img alt="" src="affiliates/affiliate_ead.jpg" width="120" height="60" border="0"></a>											
    	
    				</div>
    				</td>
    			</tr>
    Because each images have different width, i would to center them!
    What is the css code to do so, only for images contained in the <div class=banner> tag?!

    I try to do this img:banner {
    align: middle;
    }

    but it won't works...
    What's the matter?!? Thank you in advance!

  2. #2
    @alexstanford Alex's Avatar
    Join Date
    Apr 2004
    Location
    Jacksonville, Florida
    Posts
    759
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can you post a ling explaining what your asking? I'm just a little confused.
    Alex Stanford @alexstanford tumblog about.me in fb G+ K
    TechTalkin The Premier Community for Technology Enthusiasts and Professionals
    Full Ambit Media Zero Sacrifice Web Design & Development; Made in the USA @fullambit in fb G+ K

  3. #3
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    .banner{

    text-align: center;

    }
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Rome
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by The New Guy
    .banner{

    text-align: center;

    }
    Damn.....it could be more simple?!?!
    What i f**k do?!

    thank you folk!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •