www.webdeveloper.com
Results 1 to 4 of 4

Thread: Making div not wrap sibling contents

  1. #1
    Join Date
    Jan 2009
    Posts
    15

    Making div not wrap sibling contents

    I have a div with text and right after that I have an image. Since a DIV is a block level element, it causes the image to wrap to the next line. Is there some way I can prevent it from doing so?

  2. #2
    Join Date
    Jan 2010
    Location
    Poland
    Posts
    14
    Try this:
    Code:
    <div style="display: inline"></div>

  3. #3
    Join Date
    Jan 2010
    Posts
    84
    It's not an ideal solution to change a div to inline with CSS. You'd be better off to re-consider your structure.
    Perhaps you should include the image within the <div> tags, or change the <div> to a <span> or other inline element.

  4. #4
    Join Date
    Jan 2009
    Posts
    15
    Thanks for the suggestions

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles