Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

how to style a 2-column?

Hi,
Please see the attached jpg file.  The small div on the left is a fixed size image, 42X40,.  the larger div on the right will contain text that could grow longer if needed.  the space between the 2 div area will be 10px.

I tried putting a outer div to enclose these 2 div but still doesn't work right.  Appreciate some help here.   Because it's Intranet, I'm not able to provide url here.
style.jpg
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca
lapucca

ASKER

Hi, I don't need borders.  The box is intended to show as div area.  What is your 2nd example code for?

I currently uses the same as your 1st example.  However, I have style sheet classes as follow.
.evnts-image {
    width:42px;
    margin-right: 10px; float: left;
}
.events-text {
    margin-left:52px;
    float:right;

}


         <div>
            <div class="evnts-image">
               <img src="/PublishingImages/Portal/Calendar%20icons/img1.png" alt=""/>
            </div>
            <div class="events-text">
               <strong>This is a title</strong><br/> Some text about this event that should be able to grow. </div>
         </div>
The border is so you can see the divs.
There is only one code sample - the HTML and the CSS - look at the fiddle
Avatar of lapucca

ASKER

Very cool.  Thank you.