Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Div Layouts: Image Left, Text right with NO Text WrapDiv Layouts: Image Left, Text right with NO Text Wrap
Previous
 
Next
New Post
2/21/2009 4:54 AM
 

Ok, so this is no really a DNN-specific question, but I'm hoping someone will have a solid answer for this one.  I've scoured the "intraweb" looking for a decent, solid, CSS2.1, future-proof answer and have only come up with 1 that might work...

THE BACKGROUND:

I am creating some FCK templates for use in future DNN projects, both by me and my clients (as clients don't know anything about html markup, its good to have these, as they just select a layout from the "Templates" dropdown).  I have a couple of good CSS2.1 Table-Based Layouts, but as my newer projects are DIV-Based, I'm working on a set of DIV templates...

THE QUESTION:

Does anyone know how to style a div layout, with an image on the left, and text to the right - BUT the text must not wrap below the image?  (i.e. Image Left, Text Right - NO Text Wrap).

PLEASE NOTE: As these are templates and clients will be replacing placeholder images with their own images, the images <img> or CSS can have set widths nor set margins.  We need to make way for a multitude of widths here.  There's no problem in doing this when you know the width of the image.  That's simple.

The best I have come up with thus far is the following:

/* ========= */
/* THE CSS   */
/* ========= */

.divcontent {
}
.divcontent img {
    float: left;
    margin: 0px 20px 0px 0px;
}
.divcontent_text {
    overflow: auto;
}

/* ============ */
/* THE LAYOUT   */
/* ============ */

<div class="divcontent">
    <img height="180" width="200" src="" alt="Placeholder" />
    <div class="divcontent_text">
        <h1>H1 Header goes here.</h1>
        <p>Your text goes here... Lorem ipsum dolor sit amet, consectetur adipisicing
        elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
        ut aliquip ex ea commodo consequat.</p>
    </div>
</div>
<div style="clear: both;">
</div>

The "overflow: auto" for the text div works in FF3+, IE7, Chrome, Opera and Safari browsers.  It doesn't however work in IE6.  I'm also not sure if this solution is not just some sort of CSS hack, as one would ordinarly use the "overflow: auto" style when you require scroll bars on a set width or height.  As the sizes for the div are not defined, this seems to work...

I'm sure there must be a better way than this.  My concern is that its not future-proof, and not the correct way of doing this.  Plus, it needs to work in IE6.

Any suggestions / answers will be appreciated.

Thanks
Jon a.k.a. Methuzala 


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
2/22/2009 5:32 AM
 

Any takers..?

Possibly a tough one, but looking for any solid suggestions.

Thanks in advance.
Jon a.k.a Methuzala


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
2/24/2009 9:38 AM
 

 Hi

Have you tried looking on http://www.cssplay.co.uk/ 

IE 6  - Wah!

Ian


Mutate and Survive
 
New Post
2/25/2009 1:21 PM
 

Hi Marlow

Tried that.  Nothing of substance...  At least nothing I could find.

Anyone else..?

Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
2/26/2009 1:54 AM
 

ok, done by head so dont pin me on this one

 

<div style="margin-bottom:15px;">

<img style="float:left;margin-right:10px;" height="100px" width="100px" src=""/>

<div style="float:left;">text here</div>

<div style="clear:both;"></div>

</div>

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Div Layouts: Image Left, Text right with NO Text WrapDiv Layouts: Image Left, Text right with NO Text Wrap


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out