Putting logo and Title side by side
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)
Payement
We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover. We accept Paypal as a method of payment.
Shipement
Free continental shipping within 2-3 business days. Canadian shipping for $4.99. Shipped within 2-3 business days.
Return Policy
If you are not completely satisfied with your bagels, return it. No questions asked. We will refund your full purchase price.
This is the picture of what i have
this is what i m trying to achieve
Answer by Denea Novac for Putting logo and Title side by side
You should use: text-align: left;
instead of float:left;
Answer by j08691 for Putting logo and Title side by side
Float your images left:
img { float: left; }
img { float: left; }
Payement
We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover. We accept Paypal as a method of payment.
Shipement
Free continental shipping within 2-3 business days. Canadian shipping for $4.99. Shipped within 2-3 business days.
Return Policy
If you are not completely satisfied with your bagels, return it. No questions asked. We will refund your full purchase price.
Answer by Obaidul Kader for Putting logo and Title side by side
You can use something about following code. Payement
Answer by shubham khandelwal for Putting logo and Title side by side
Payement
We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover. We accept Paypal as a method of payment.
Just wrap the img and h2 inside a div and gave style as display:flex
Answer by Riskbreaker for Putting logo and Title side by side
all you need is something like this:
img, h2 { display: inline-block; }
Obviously you can be more detailed like class h2 , etc
OR you can do it inline like you are doing it now... though redundant (whatever you please)...but that should do it.
You can also do flex
too on the parent div if you want to go more modern css3
Answer by kag359six for Putting logo and Title side by side
You can use flexbox to get the desired result. I think it is the easiest solution and the one that looks best.
Payement
We accept all major credit and debit cards including Mastercard,Visa, American Express, and Discover. We accept Paypal as a method of payment.
Shipement
Free continental shipping within 2-3 business days. Canadian shipping for $4.99. Shipped within 2-3 business days.
Return Policy
If you are not completely satisfied with your bagels, return it. No questions asked. We will refund your full purchase price.
Here is the CSS:
.flex-wrapper { display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .logo { flex-shrink: 0; width: 30px; height: 30px; background-color: black; /* remove this line */ } h2 { margin-right: 50px; margin-left: 25px; width: 100px; flex-shrink: 0; }
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72
0 comments:
Post a Comment