Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Position a Floated Div/Image

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25522
    sethmac
    Member

    Is it possible to push a floated div so the text wraps both sides of an div/image.

    Ex: This is what my image currently looks like:

    IMAGE Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida,
    HERE orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.

    Ex: This is what I want (without using align="left"
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida,
    IMAGE orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit HERE vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.

    #60980
    TheDoc
    Member

    are "IMAGE" and "HERE" separate items? Can you draw a picture of what you’d like to achieve? It looks like you simply want to float "IMAGE" left and "HERE" right.

    #60970
    sethmac
    Member

    Sorry….IMAGE HERE was mean to represent a single image that would span multiple lines.

    #61031
    TheDoc
    Member

    A single image cannot be broken up into multiple items.

    #61022
    sethmac
    Member

    Maybe I’m not being clear enough (or my picture is just bad)…I want a floated image to have text around the top and bottom, rather than just having text wrap under and to the side.

    Does that make sense?

    #61032
    TheDoc
    Member

    You’ll need to show an example I think.

    #61034
    EamonnMac
    Member

    Do you mean to have an image floating in the middle of your paragraph (not up against either side of the div) with the text floating all around it? If so, then no – someone might correct me here, but I don’t see how that would be possible.

    On second thoughts, while I’m typing, it MIGHT be possible to get the same effect through a workaround – you could achieve a blank space in your paragraph by using inline spans of ‘whatever’ width, then absolutely position an image into the space created…just a thought…

    If the image is up against, say, the left side (or right), and you just want to position it lower down in your text block, then just place the img tag in your HTML in the line of text at which you want the top of your image to begin. The previous text lines will flow as normal above it, the affected lines (depending on the height of your image) will flow to the right and the paragraph will resume normal line length beneath it…

    #61060
    TheDoc
    Member
    "apostrophe" wrote:
    Apparently I’m the only person that can see my first post so I’ll say it again. The only way to do that is to put the image inline.

    I know what you’re saying, but I’m not 100% sure that’s what he’s after. Maybe it is, but something about that diagram he used makes me feel like it isn’t.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.