<div class="w3-row w3-padding-64 ws-black">
<div style="max-width:1400px;margin:auto">
<div class="w3-col l6 w3-center" style="padding:2% 3%;">
<div class="w3-card-2 w3-round" style="color:black;background-color:#FFC0C7;padding:24px">
<h2 style="font-size:45px;float:left;font-weight:700">COM</h2>
<div style="height:50px;">
</div>
<a href="com.html" class="w3-button tut-button black-color w3-margin-bottom">Learn COM</a>
</div>
</div>
<div class="w3-col l6 w3-center" style="padding:2% 3%;">
<div class="w3-card-2 w3-round" style="background-color: #FFF4A3;color:black;padding:24px">
<h2 style="font-size:45px;float: left;font-weight:700">PduR</h2>
<div style="height:50px;">
</div>
<a href="Pdur.html" class="w3-button tut-button black-color w3-margin-bottom">Learn PduR</a>
</div>
</div>
Here
- I need to make com and pdur to be in side by side, but it’s coming down
- And next thing is I need to remove the learn com link and instead of that if a person clicks on com it should move to next page
- I have attached the screenshot
2
Answers
You can use flex property of css to align content side by side
You can align the two items next to one another using a flexbox.
The CSS is as follows:
You’ll add the flex-item class to your two divs:
You can also use
float
if you don’t wish to use a flexbox: