Solved

Div with in a Div and word wrap

Posted on 2014-02-18
6
216 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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.…

803 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