Jump to content

Recommended Posts

I want to have text for a certain element to wrap around an image(#content .body img) in the same element. the image is positioned relative. the reason for positioning the DIV relative is if i use float:left; the image is removed from the containing DIV(#content .body).

 

If i set the text(#content .body p) to display:inline then is partially wraps the text(first line wraps around the bottom of the image).

 

Is there anything I can do to wrap the text around the image?

 


#content .body {
position:relative;
top:60px;
left:15px;
background: rgba(0, 0, 0, 0.6);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
max-width:650px;
-webkit-border-radius:15px;
-moz-border-radius:15px;
border-radius:15px;
}

#content .body img {
position:relative;
top:15px;
left:15px;
margin-right:15px;
margin-bottom:15px;
}

#content .body p {
position:inherit;
padding:10px;	
font-size:14px;
text-indent:20px;
display:inline;
}

<div id="contentContainer">
		<div id="navigation">
			<ul>
                	<li><a href="#">News</a></li>
				<li><a href="#">Reviews</a></li>
				<li><a href="#">Videos</a></li>
				<li><a href="#" id="active">Downloads</a></li>
				<li><a href="#">Contact</a></li>
			</ul>
			<img id="divider" src="images/divider.png"/>
		</div>
            
            <div id="content">
            	<div class="title">
                	<h2>Google I/O 2011</h2>
                </div>
                <div class="body">
                	<img src="images/icecream.png" />
                	<p>At the live keynote, Google announced 2 new versions of it's Android OS. First the 3.1 update for Android Hunnycomb and the next big release Android Ice Cream Sandwich or Android 4. This version of Android is going to include many new features. First is Google is standardizing the Android Platform across all devices, this means that the same OS that is on Android phones with also be on Android Tablets. This new OS is going to have all the features of Android 3, but optimized to work on both Tablets and Phones. <a href="#">READ MORE</a></p>
                </div>
            </div>

	</div>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.