Solved

Div with in a Div and word wrap

Posted on 2014-02-18
6
211 Views
Last Modified: 2014-02-18
here is a Pic what i want
The main box's is a div then the text in it but i want to add other div in that one with the text word wrap around it.

How do i do that ?
0
Comment
Question by:armasmike
6 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 39867751
<style>
.inner{float:right;margin-left:10px;}

</style>

<div class="outer">
     <div class="inner">
     </div>
</div>

Open in new window

0
 
LVL 9

Accepted Solution

by:
WebDevEM earned 250 total points
ID: 39867752
Hi,

I've created a Fiddle (http://jsfiddle.net/webdevem/QLYAL/) to demonstrate it, but here's the code:
<div id="outerOne">
    <div id="innerOne"><div id="littleGuy">
            This is a test
        </div>
        Test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test
        
    </div>
</div>

Open in new window

and the CSS:
div {
    padding: 5px;
}
#outerOne {
    border: 2px solid #cacaca;
}
#innerOne {
    border: 2px solid #000;
    border-radius: 5px;
}
#littleGuy {
    width: 200px;
    float: right;
    border: 2px solid #000;
}

Open in new window

0
 

Author Closing Comment

by:armasmike
ID: 39867753
thank you
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 8

Expert Comment

by:Adrian Crabtree
ID: 39867754
Hi armasmike,

You can achieve this with the CSS property float. You can take a look at the example I set up for you: http://jsfiddle.net/MZeDE/

I have the inner div floated to the right with a margin on the bottom and left to give it more space from text surrounding it.
0
 
LVL 8

Expert Comment

by:Adrian Crabtree
ID: 39867755
SO FAST! :) Never mind.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39867758
Here is a sample http://jsbin.com/kiyugexe/1/
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now