Hello there, I am currently in the process of creating my own portfolio. I have a brief introduction that I would like to display next to an image of myself, with the image positioned on the right side.
I have a div called "container" which contains another div where the image and introduction are placed like this:
<body>
<div class="content">
<img src="images/sjforwebsite.png" alt="Luigi and his dog" width="600" height="auto">
<div class="introduction">
<h2>
Hello, hello! <br>
My name is Steven Johnston
</h2>
<p>
Thank you for visiting. <br>
You can refer to me as "Steve" if you'd like! <br>
I'm 28 years old and currently looking for a web developer position.
</p>
<p>
I have a passion for web development. <br>
Especially designing visually appealing, robust, user-friendly websites. </p>
<p>
Apart from web development, <br>
I enjoy playing video games, watching horror movies, and going for walks. </p>
<p>
I am proficient in Python, Java, Kotlin, HTML, CSS, and JavaScript. <br>
Additionally, I work with Adobe XD and Ableton for music production.
</p>
<p>
Creating meaningful projects is what drives me, and I thrive in collaborative environments.
<br>
I believe I could be a valuable asset to your team! Feel free to reach out anytime.
</p>
</div>
</div>
</body>
Here are the CSS styles used:
.root {
background-color: aliceblue;
font-size: 62.5%;
}
.content {
max-width:70%;
margin: auto;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
max-width: 80rem;
}
.introduction {
border-radius: 5px;
margin-top: 10rem;
font-family: 'Source Sans Pro', sans-serif;
display: flex;
justify-content: center;
align-items: flex-start;
flex-direction: column;
padding: 0.5rem;
}
I'm facing challenges in making the introduction div wrap below the image properly.
As shown in the images provided, when the webpage width decreases, I want the div to move under the image on the right. Any advice on achieving this layout adjustment would be much appreciated. Thank you.
https://i.stack.imgur.com/ke1nq.png https://i.stack.imgur.com/Ye9aY.png