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 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Caerdydd
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sinking DIV (i.e. not floating...)

    I want two images to float on the right hand side of my page while the text wraps around and underneath it. I thought the best way would be to place the images in a DIV and float that, but it remains glued to the left of the page. Here is the code I am using:

    <div style="width: 200px; float: right;">
    <img src="image_1.jpg" width="200" height="396"><br>
    <img src="image_2.jpg" width="200" height="154">
    </div>

    <p>This is the text I want to wrap around the images....
    </p>

    What am I doing wrong?

    BL
    "nam et ipsa scientia potentas est" - Francis Bacon

  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how about this :-)

    Code:
    <body>
    <div style="width: 200px; float: right;">
    <img src="image_1.jpg" width="200" height="396"><br> 
    <img src="image_2.jpg" width="200" height="154"> 
    This is the text I want to wrap around the images.... 
    </div>
    sorry if its wrong

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    A little unclear what you want...

    <img style="float:right;" src="image_1.jpg" width="200" height="396"><br>
    <img style="float:right;" src="image_2.jpg" width="200" height="154">
    <p>This is the text I want to wrap around the images....This is the text I want to wrap around the images....This is the text I want to wrap around the images....This........

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried it and it works, try adding a border to the div so you can see it's edges and get a better idea of what it's really doing.

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    Caerdydd
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks guys.

    It turns out this is a cross-browser thing. The code works fine in every browser except the one I happened to be using at the time, namely the preview window in Dreamweaver. Sorry if I've wasted your time.

    BL
    "nam et ipsa scientia potentas est" - Francis Bacon


  •  

    Posting Permissions

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