Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    Imagine inserting an image into a block of text so it looks something like the following.

    xxxxx---------
    xxxxx-image
    xxxxx---------
    xxxxx---------
    xxxxxxxxxxx
    xxxxtextxxx
    xxxxxxxxxxx

    However instead of an image i would like to have a div there. Is this possible? Can anyone link me to something which tells me how to do it?

    If you want my HTML and CSS I can provide it.

  2.  

  3. #2
    Junior Member xavier's Avatar
    Join Date
    May 2007
    Posts
    2
    Member #
    15266
    I don't know if you can do without the img tag completely, but if you utilize the float class then it is possible with div's..for instance
    CSS CODE
    .floatright
    {
    float: right;
    width: 100px;
    }

    HTML CODE
    <div class="floatright">
    <img src="images/image.gif" alt="" width="100" height="100"><br>
    Caption here
    </div>
    <p>
    Lorem ipsum dolor sit amet, consectetuer...
    </p>
    There is complete tutorial here.

  4. #3
    Junior Member xavier's Avatar
    Join Date
    May 2007
    Posts
    2
    Member #
    15266
    I apologize..after reading thread again I understood the div comment better...same site has answer but here is direct link.

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Code:
    <div style="width: 800px;">
        <div style="width: 400px; float: right; background: #F00; margin: 10px; color: #FFF">
            <p>Subdiv</p>
        </div>
        <p>Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content. Main div content.</p>
    </div>

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Bingo. Make sure in your actual page not to inline the styles -- put them in an external stylesheet instead. Also make sure that the item you're floating is listed before the items you want flowing around it in the markup, as not doing so can lead to unexpected behavior.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com