Solved

Div with in a Div and word wrap

Posted on 2014-02-18
6
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 53

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 53

Expert Comment

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google Tag Manager - Add Trigger Using Div class 22 100
Text too large in Chrome 17 83
Asp response.write to clients 6 48
Table style position to the left 8 39
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 i…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

710 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