SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Centering image

  1. #1
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Centering image

    I need an image to be centered with CSS without using <center> or <div> tags.
    I've tried the following code:

    .footer{
    text-align:center;
    vertical-align:middle;
    background-color:#FFFFFF;
    background-image:url("http://www.url.com/images/dm_iso_footer.jpg");
    background-repeat: no-repeat;
    font-size:12px;
    height:39px;
    }

    text-align won't center the image. What is it suppoused to work to do that?


    Thanks in advance,
    Last edited by Marcelo; Dec 27, 2003 at 22:49.
    Marcelo

  2. #2
    Web Genius
    Join Date
    Nov 2001
    Location
    Canada
    Posts
    708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    align: center;


  3. #3
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ramprage
    align: center;

    No, it wasn't that the solution. I've solved it. It is using:

    background-position: center;

    Thanks anyway,
    Marcelo

  4. #4


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
  •