Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2008
    Posts
    95
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Status of text wrap around centered img debate

    Ok, I have a client who insists she must have, on her homepage, a centered image with text that wraps around it. First, Is there any "correct" way to do this yet? Second, if not, what's my best option?

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello alexmel7,
    The float left/right allows you to put text beside the image but not on both sides.

    We would need a float:both; for CSS to be able to do this.


    I did find this though... http://alistapart.com/articles/crosscolumn/
    Last edited by Excavator; 02-28-2009 at 06:46 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder BoldUlysses's Avatar
    Join Date
    Jan 2008
    Location
    Winston-Salem, NC
    Posts
    938
    Thanks
    10
    Thanked 190 Times in 187 Posts
    Hi alexmel7,

    There are ways of centering the image vertically on the left or right side of a containing box, but there's currently no way of centering the image both vertically and horizontally so that the text wraps around it like this.

    If you're not concerned about IE support (which, unfortunately, you should be), you could make a multi-column layout, slice the image in half vertically and position half of it in one column, pushed down, and half in the other column, so that the text would wrap around it (like this). I haven't tried this myself, and again, it's a CSS3 declaration, which no versions of IE currently support, but it did pop into my mind as an idea.

    This page might interest you as well.
    matt | design | blog

  • #4
    New Coder
    Join Date
    Dec 2008
    Posts
    95
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thanks for the info guys. I think it makes it much less readable with a centered image anyway. Gonna have to convince the client of this


  •  

    Posting Permissions

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