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 3 of 3
  1. #1
    Regular Coder kyllle's Avatar
    Join Date
    Mar 2008
    Posts
    334
    Thanks
    85
    Thanked 2 Times in 2 Posts

    Image float question

    Hi all,

    Very simple question that I dont know the answer to;

    I have an image and text, I float the image to the left and want the text to be on the right of this but with no wrapping round the image, how do I prevent the text from wrapping?

    Code:
    <div style="width: 600px;"> 
    <img src="large-190x100.jpg" width="190px" height="100px" style="float: left; padding: 10px;"/>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras risus mi, hendrerit eu, rutrum ac, ornare eu, dui. Aliquam sit amet sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas placerat orci eu nisi. Duis ac felis imperdiet metus pharetra iaculis. Pellentesque enim. Vestibulum vulputate lectus ac mauris. In in dui eu turpis elementum luctus. Praesent nulla ante, pharetra sit amet, condimentum convallis, rhoncus ut, justo. Nunc erat. Cras viverra fermentum justo. Ut vitae metus. Donec tincidunt magna. Donec eget est. Phasellus malesuada. Aenean non mi et est molestie blandit. Proin facilisis ultrices est. Cras eu dolor fermentum ipsum convallis hendrerit. In luctus, velit et interdum gravida, orci risus cursus est, eget accumsan nulla libero vel libero. In at enim et arcu pharetra convallis. </p>
    </div>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Code:
    p{
    margin-left:190px;
    }
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder kyllle's Avatar
    Join Date
    Mar 2008
    Posts
    334
    Thanks
    85
    Thanked 2 Times in 2 Posts
    Thanks abduraooft!!

    lol I thought that was the answer but then I thought there might have been somethin different so I just queried it to be safe!!!

    Thanks

    Kyle!


  •  

    Posting Permissions

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