SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image Slightly Off

    Just full of CSS questions today. Would anyone know why my top graphic, the fire is not quite centered compared to my sample image using this address:

    http://dev.ninetydegreeslant.com

    A bit odd. Looking through my styles, not quite sure what the deal is. Moz and Opera look slightly off compared to IE, which is how it should look.
    Ryan Butler

    Midwest Web Design

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,788
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    The images aren't centred because you have set all images to display:block which means that text-align:center will no longer center them because they are not inline content anymore.

    You also need to increase the width of that column as it is 6px too small.

    Code:
    #main{
     position:absolute;
     top:350px;
     left:100px;
     width:356px;
     text-align:center;
     margin:20px;
    }
    #main img {margin:auto}
    
    Hope that helps.

    Paul

  3. #3
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why is the column not big enough? Actually I know the answer to this now that I think about it. I need to reduce this image, since CSS cannot be used to fit arbitrary image sizes. Why is that would be question? It probably has to do with trying to fit a couch through a door. Another words the widths don't match up. I sometimes make this design stuff too difficult.
    Ryan Butler

    Midwest Web Design


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
  •