I'm experimenting with HTML and CSS and have a query concerning the text-align properties.
As I work on constructing my personal website, I aim to align text content to start while having it centered in the middle of the page. Currently, I've managed to center the content, but only when the text-align property is set to center. Is there a way to achieve centered text content with text-align set to start? Ideally, I prefer not to rely heavily on padding as it caused responsive issues in this context, which needed multiple media screen adjustments to resolve.
Apologies for the somewhat elementary question.
HTML
.Container1 {
height: 100%;
width: 100%;
background: #e8eaed;
background-size: cover;
display: table;
margin: auto;
display: table;
top: 0;
}
.About {
font-family: 'Lato';
font-weight: 300;
margin: 0 auto;
display: table-cell;
vertical-align: middle;
max-width: none;
}
.Content2 {
margin: 0 auto;
text-align: center;
}
.About h2 {
font-size: 40px;
letter-spacing: 4px;
line-height: 10px;
font-style: italic;
color: #70a1af;
text-shadow: 2px 2px white;
text-align: center;
}
.About p {
font-size: 18px;
letter-spacing: 4px;
line-height: 20px;
color: #70a1af;
}
<section class="Container1">
<div class="About">
<div class="Content2">
<h2> ABOUT ME.</h2>
<p> Computer Science // British Born // Wannabe Australian </p>
</div>
</div>
</section>
https://i.sstatic.net/sQUt5.png
This is the desired alignment for the text, centered in the middle of the page...