I am trying to make a business card with name and title in the center and email and phone to be on extreme left and right on the card
Here is my following code
.business-card{
position:relative;
border:1px solid black;
width:200px;
}
.business-card section {
display:flex;
flex-flow:column;
align-items:center;
}
.email{
position:absolute;
right:0;
}
<div class="business-card">
<section>
<span>
name:abc
</span>
<span>
title:xyz
</span>
</section>
<footer>
<span class="phone">
123-123-123
</span>
<span class="email">
abc@abc.com
</span>
</footer>
</div>
.business-card{
position:relative;
border:1px solid black;
width:200px;
}
.business-card section {
display:flex;
flex-flow:column;
align-items:center;
}
.email{
position:absolute;
right:0;
}
<div class="business-card">
<section>
<span>
name:abcsfsdfjsdflkjsdjflssfsdfds
</span>
<span>
title:xyz
</span>
</section>
<footer>
<span class="phone">
123-123-123
</span>
<span class="email">
abc@abc.com
</span>
</footer>
</div>
Can some one please help on this PS:Attached is the sample screen shot of the business card im looking to develop
Please let me know if your problem is solved.
Check Below snippet... let me know
Get a codepen.io account > search "business card" and then create something similar based off another person's pen. You can learn this way about other methods you wouldn't normally know about.
As for this, I'd probably make a DIV of something like 500px
The picture would take 50% of the div's heigh Then format your text accordingly
When we type names, we put spaces between first, middle and last names. Assuming that none of these is very long, we can make your code work simply by swapping 'align-items' with 'text-align'.
HTML:
CSS:
Please let me know if this solves your problem.