SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    aligning images in CSS

    Does anyone know a reliable way of doing this?

  2. #2
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you expand or post a link with the problem?
    "There's no justice like angry mob justice!" --Seymour Skinner

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well it isn't a problem as such. I usually find a way of getting the desired result, even if it means using <center> tags, but I'm sure it must be possible to do it in CSS. After all, that's what style sheets are for!

  4. #4
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    www.alistapart.com This weeks artical should help, plus there are loads of css links to keep you busy

  5. #5
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <center> still holds well, but css can do so to.

    <div style="text-align:center"><img src="yourpic.gif"></div>

  6. #6
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I believe <center> has been deprecated. The recommended way (without CSS) is to use <div align="center"></div>

  7. #7
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm....

    You're right. Center is deprecated. But align seems to be on the list too...

    http://www.w3.org/TR/html4/present/g....html#h-15.1.2

    Transition into the future is not an easy path is it?

  8. #8
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to use <div>? That seems barmy.

  9. #9
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Inline didn't want to work in img tag.
    Embedded class didn't want to work in img tag.
    Span using either inline or embedded class didn't want to work.

    So far, DIV seems to be the workable one.

    This is using IE5.5.

    Perhaps since the centered items will be an area upon themselves (not surrounded by other elements) then div is the usable and obvious choice.


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
  •