When my screen size is 768px and above, I am trying to align the logo to the left and multiple paragraph to the right. See the following pic. But I tried using float and display inline block but the the whole top class
will align all the way to the left. It cannot be centralized, to all the gurus out there, please help as I am new in CSS. Thanks.
WHAT I AM TRYING TO ACHIEVE
WHAT I AM FACING
**
body {
margin:0;
padding:0;
font-family: Open Sans;
}
.img-logo{
width:300px;
display: block;
margin-left: auto;
margin-right: auto;
}
.img-banner{
width:300px;
display: block;
margin-left: auto;
margin-right: auto;
}
.top{
width: 300px;
margin: 0 auto;
}
.top p {
text-align: center;
}
.top p b {
color: #053D66;
}
.header{
width: 300px;
margin: 0 auto;
}
.wrapper{
width: 300px;
margin: 0 auto;
}
ol.s {
list-style-type: upper-greek;
}
.img-footer{
width:100%;
margin: 0 auto;
}
/* ----------- responsivity ----------- */
@media only screen and (min-width: 768px) {
.top{
width: 600px;
margin: 0 auto;
display: inline-block;
}
.toright {
float: right;
}
.toleft {
float: left;
}
.img-banner{
width:600px;
}
.header{
width: 600px;
}
.wrapper{
width: 600px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans">
<title>Updates</title>
</head>
<body>
<div class="top">
<div class="toleft">
<img class="img-logo" src="http://www.talent-trust.com/documents/img/talent-trust.png" alt="">
</div>
<div class="toright">
<p style="margin:0px"><b style="color:#053D66;">E</b> <a href="mailto:info@talent-trust.com">info@talent-trust.com</a></p>
<p style="margin:0px"><b style="color:#053D66;">T</b> 0757 278 8418</p>
<p style="margin:0px"><b style="color:#053D66;">W</b> <a href="http://www.talent-trust.com">www.talent-trust.com</a></p>
</div>
</div>
<div class="header">
<p><h2>COVID19 Medical Update for Missionaries, July 2020</h2></p>
<p>Significant issues remain even if you have insurance</p>
</div>
</body>
</html>
**