I've been working on my personal portfolio website and ran into an issue when trying to position the image with text that says Ib student. I attempted using the bootstrap box model which didn't work, followed by using float, but that also didn't produce the desired result. The text always appears at the top of the page, and when I try to adjust its position using position: absolute
, it ends up in a location I don't want when resizing the page. In summary, how can I successfully align these elements?
Here's a look at the current appearance:
body {
text-align: center;
color: #FFF5FD;
}
header {
background-color: #FF96AD;
}
header h1 {
color: #FFF5FD;
font-family: 'Dancing Script', cursive;
font-size: 6rem;
padding-top: 16px;
}
header img {
width: 16%;
border-radius: 60%;
margin-top: 30px;
min-width: 200px;
}
.navbar-brand {
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 3px;
}
.capton {
font-size: 1.3rem;
margin-top: 18px;
font-family: 'Spartan', sans-serif;
font-weight: 600;
}
.ib {
width: 6%;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="53313c3c27202721322313667d637d62">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<header id="home">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#home">Batı Gözen</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" aria-current="page" href="#">Home</a>
<a class="nav-link" href="#">My Work</a>
<a class="nav-link" href="#">CV</a>
</div>
</div>
</div>
</nav>
<img src="https://via.placeholder.com/300.jpg/" alt="My Picture">
<h1>Batı Gözen</h1>
<p class="capton">"Web Developer, Video Editor"</p>
<div class="row row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1">
<div class="col">
<img src="https://via.placeholder.com/400.jpg/" alt="IB" class="ib">
</div>
<div class="col">
<h3> IB Student, 12.th Grade</h3>
</div>
</div>
</header>
<section id="resume">
<h3>My Resume</h3>
</section>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="680a07071c1b1c1a0918285d46584659">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous">