Create a list layout with flex

How do I create a list of items in flexbox.. Each entry in the list will have the attached image format

Thanks  Capture.JPG
chand pbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You would start with an unordered list where each list item can contain column div's for the left (blue) and right(white).
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width">
      <title>test</title>
   </head>
   <body>
      <ul>
         <li>
            <div>
               <div class="date_number">12
                  <span class="day_name">Fri</span>
               </div>
               <div class="time">11:00am - 4:00pm</div>
               <div class="line">Restaurant</div>
               <div class="line">Bartender</div>
            </div>
         </li>
      </ul>
   </body>
</html>

Open in new window

From here, it will be a matter of updating your css to style with background and font colors as well as to specify the font to use.
chand pbAuthor Commented:
Thanks Scott.

I got the HTML part .it is SCSS that I need help with...

Basically , how do you get the div  to be side by side and how to get the image to alway be on the right


Thanks
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
https://jsbin.com/kacuwateyi/edit?html,output
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width">
      <title>test</title>
     <style>
       .date_number{float:left;}
       .day_name{display:block;}
      
       .time{float:left;}
       .line{display:block;}
       
       /* STYLE IT */
       ul{ 
         list-style-type: none;
       }
       
       .date_number{
         background-color:blue;
         color:white;
         padding:10px;
         height:50px;
       }
       
       .time{
         background-color:white;
         padding:10px;
         height:50px;
       }
    </style>
   </head>
   <body>
      <ul>
         <li>
            <div>
               <div class="date_number">12
                  <span class="day_name">Fri</span>
               </div>
               <div class="time">11:00am - 4:00pm
                 <span class="line">Restaurant</span>
                 <span class="line">Bartender</span>
               </div>    
             </div>
         </li>
      </ul>
   </body>
</html>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Flex CSS

From novice to tech pro — start learning today.