Advertisement

06.09.2008 at 05:48PM PDT, ID: 23471007
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

How do I use CSS to align an image on the right side of a div without disrupting the flow?

Asked by oldmuttonhead in Cascading Style Sheets (CSS), Miscellaneous Web Development, Extensible HTML (XHTML)

Tags: ,

I need help with aligning an image with a transparent background on a website and wrapping the text tightly around the image.  For example,  the text will wrap around the shape of the van and not the "rectangle" of the image.  Everything is in CSS.  The page currently has a header, a "content" div to the left of the main section, a menu on the right, and a footer at the bottom.  I need to have the image on the right side of the left content section.  The only way I can get the van image on the right is to use "float: right;" but that breaks the text wrapping tightly to the image. Can I use CSS to make it format the text while ignoring the van image?  

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
The CSS:
body {
margin: 0;
padding:0;
background: #fff;
}
 
#headercontent{
 width: 100%;
 height: 190px;
 margin: 0;
 border: solid #333;
 border-width: 0 0 2px 0;
 }
 
#leftcontent {
width: 80%;
float: left;
color: #000;
padding: 5px;
}
 
#rightcontent {
float: right;
width: 15%;
padding: 20px;
}
 
#footercontent 
{
    width: 100%;
    height: 50px;
    margin: 0;
    border: solid #333;
    border-width: 2px 0 0 0;
    font-size: .7em;
    text-align: center;
}
#vanimage{
    float:right;
}
#flowvan{
    margin: -195px 0 0 0;
    padding: 0 0 0 0;
    height: 200px;
}
.flowing {
    clear: right;
    float: right;
    margin: 0 0 0 2em;
    height: 15px;
}
 
The HTML of the content section only(I'm using master pages):
 
<%@ Page Language="VB" MasterPageFile="~/sunstream.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Sun Stream Carpet Cleaning" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque augue purus, molestie ac, molestie in, eleifend et, nibh. Curabitur risus massa, cursus tincidunt, auctor vitae, vulputate in, ligula. Cras consequat accumsan mauris. Nunc luctus risus eget risus. Quisque nisi. Duis tempus sodales mauris. Suspendisse mi urna, imperdiet non, dignissim at, varius in, turpis. Proin leo. Cras bibendum elementum pede. Cras dui lorem, tincidunt nec, condimentum sed, aliquet nec, sem. Aliquam eu eros ut nibh cursus mattis. Vestibulum facilisis sagittis risus.
</p><p>
Nulla iaculis pretium nisl. Aliquam quam tellus, suscipit quis, dictum vel, accumsan at, tellus. Praesent vel libero et metus aliquam blandit. Duis hendrerit nisl non enim. In hac habitasse platea dictumst. Etiam consectetuer lacinia sem. Nam rhoncus. Maecenas malesuada neque vitae leo. Sed mauris elit, pellentesque sit amet, sagittis id, dictum eu, dolor. Aliquam erat volutpat. Duis interdum nibh et arcu. Aliquam erat volutpat. Pellentesque tincidunt elementum erat. Ut vulputate, sapien quis egestas dapibus, leo neque venenatis tortor, tempor varius sapien nisl id lacus. Quisque iaculis, ipsum ac faucibus vehicula, nisl lectus commodo mauris, id consectetuer arcu purus eget nisi. Aliquam erat volutpat.
</p>
<img id="van" src="images\vanimage.gif" />
<div id="flowvan">
  <div class="flowing" style="width: 200px;"></div>
  <div class="flowing" style="width: 200px;"></div>
  <div class="flowing" style="width: 400px;"></div>
  <div class="flowing" style="width: 450px;"></div>
  <div class="flowing" style="width: 450px;"></div>
  <div class="flowing" style="width: 450px;"></div>
  <div class="flowing" style="width: 450px; height: 8px;"></div>
  </div>
<p>
Curabitur mattis luctus est. Morbi dui. Proin elementum. Sed dignissim. Cras a felis et lectus feugiat mattis. Sed eget magna. Sed nulla libero, aliquam vitae, vehicula eget, vestibulum sed, eros. Sed convallis, velit sit amet euismod varius, elit metus fringilla augue, faucibus tincidunt sem metus sed lacus. Nunc ac dui ac enim mollis sollicitudin. Donec sollicitudin, nisl sed ullamcorper tincidunt, elit elit hendrerit lacus, vitae aliquet ipsum justo eu libero. Nulla vel lectus vel ante mattis mattis. Integer dapibus imperdiet dui. </p>
</asp:Content>
 
Loading Advertisement...
 
[+][-]06.09.2008 at 06:17PM PDT, ID: 21747824

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 07:14PM PDT, ID: 21748022

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 06:44AM PDT, ID: 21769352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 06:50AM PDT, ID: 21769427

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Miscellaneous Web Development, Extensible HTML (XHTML)
Tags: XHTML/CSS, All
Sign Up Now!
Solution Provided By: bluefezteam
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628