SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: image align

  1. #1
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    image align

    How would I center align my images? There really should be an image align tag or at least have the text-align work for images as well.
    Thanks,
    Keith
    Keith Rousseau

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In what context? There are many ways to skin this particular moggy...

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

    Text align does work for images.

    e.g.

    Code:
    .centre {text-align:center}
    
    <p class="centre"><img src="img.gif" width="60" height="60" /></p>
    Or is that not what you meant?

    Paul

  4. #4
    SitePoint Member
    Join Date
    Mar 2003
    Location
    NY
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats how I do it Paul. However, it is incredibly annoying to center elements in the body of a page...you either have to text-align: center the everything in the body or assign a margin of 0px auto to the block element. It's way too complicated...seems like it should have been something that was addressed by css2

  5. #5
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just made a stupid mistake and included text-align in my image class. I'm all set now, though.
    Thanks
    Keith Rousseau


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
  •