Mnia Mnia - 2 months ago 11
CSS Question

Putting logo and Title side by side

I m trying to align the logo and the title side by side so that the paragraph will go below . I tried float by it's not working .How can I easily do it ?(css noobs)

<div class="left-column" style="float:left; background-color:#FF0; margin-left:10px; margin-top:20px;" width = "515">
<div class= "Payement" style=" background-color:#D5D5D5">
<img src="images/Forma1copy.png" class="logo_page"/>
<h2>Payement</h2>
<p> We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover.
We accept Paypal as a method of payment. </p>
</div>
<div class= "shipement" style=" background-color:#D5D5D5">
<img src="images/Forma1_0.png" class="shipement_logo" />
<h2>Shipement</h2>
<p>Free continental shipping within 2-3 business days.
Canadian shipping for $4.99. Shipped within 2-3 business days.</p>
</div>
<div class ="return_policy" style=" background-color:#D5D5D5">
<img src="images/Forma1.png" class="return_policy" />
<h2>Return Policy</h2>
<p> If you are not completely satisfied with your bagels, return it. No questions asked. We will refund your full purchase price.</p>
</div>
</div>


This is the picture of what i have

this is what i m trying to achieve

Answer
<div class= "Payement" style=" background-color:#D5D5D5">
     <div style="display:flex">
     <img src="images/Forma1copy.png" class="logo_page"/>
     <h2>Payement</h2>
     </div>
     <p> We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover. 
 We accept Paypal as a method of payment. </p>
    </div>

Just wrap the img and h2 inside a div and gave style as display:flex

Comments