html – Responsive website, text and form are not auto-adjusted in the field view port.

I’m building a responsive website, it will work all over the screen, I can manage to wrap some of my content when it overflows, even though my page has this last content that doesn’t want to wrap at all ۔
This is the CSS code:

* {
    margin: 0;
    padding: 0;
    box-sizing:  border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier Prime', monospace;
    font-size: 1.6rem;
    color: var(--primary-color);
    line-height: 1.5;
}
h2{
    font-size: 7rem;
    margin-bottom: 6rem;
    text-transform: uppercase;
    line-height: 1.2;
}
.bg-circle {
    background-image: url("/assets/img/bg.svg");
    background-size: cover;
    background-position: center center;
    color: var(--white-color);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10rem var(--gap);
    padding: var(--gap);
}

.section {
    min-height: 100vh;
}

.menu-spacing {
    height: 60px;
}

.white-bg {
    background: white;
    color: black;
}
.intro-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    min-height: 100vh;
    gap: var(--gap);
}

.intro-text, .intro-img {
    display: flex;
    flex-flow: column wrap;
}

.intro-img img{
    max-width: 100%;
    height: auto;
}

.top3-content {
    max-width: 64rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.grid-intro-content {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    min-height: 100vh;
}

.grid-intro-content h2 {
    padding-top: 6rem;
}

.grid-intro-content h2 {
    margin-bottom: 2rem;
}

.description {
    margin-bottom: 6rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    counter-reset: gridcounter;
}

.grid h3 {
    position: relative;
    padding-left: 5rem;
    padding-bottom: 1rem;
}

.grid h3::before {
    counter-increment: gridcounter;
    content: counter(gridcounter);
    position: absolute;
    font-size: 7rem;
    font-style: italic;
    top: -4.2rem;
    left: 0;
    transform: rotate(5deg);
}

.gallery-img {
    width: 100%;
    max-height: 36rem;
    max-width: 36rem;
    overflow: hidden;
}

.gallery-img img {
    transition: all 300ms ease-in-out;
}

.gallery-img img:hover {
    transform: scale(1.2) translate(-3%, -3%) rotate(5deg);
}

.contact-form {
    grid-column: span 2;
}

.contact-form .form-grid {
    border: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--gap);
}

.form-group {
    flex: 1 1 320px;
}

.form-group label {
    display: block;
}

.form-group input, .form-group textarea {
    border-radius: 10px;
    padding: 5px;
    background: white;
    outline: none;
    width: 100%;
    font-size: 1.4rem;
}

body .full-width {
    width: 100%;
    flex: 1 1 100%;
}

.form-grid legend {
    text-align: left;
    font-style: italic;
    font-size: 1.4rem
} 

.form-group button {
    border: 0.3rem solid black;
    background: none;
    color: black;
    padding: 1rem 1rem;
    font-size: 2rem;
    cursor: pointer;
    transition: all 300ms ease-in-out;
}

.form-group button:hover{
    border: 0.4rem solid #988BC7;
    color: #988BC7;
}

.form-group input:focus{
    border: 3px solid #988BC7;
}

.form-group textarea:focus{
    border: 3px solid #988BC7;
}

.form-group button {
    justify-content: center;
    align-items: center;
}

.footer-content p a{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: inherit;
}

This is the part that doesn’t get wrapped up:

 <section class="section white-bg" id="contact">
            <div class="main-content intro-content">
                <div class="intro-text">
                    <h2>Cadastre-se para ter acesso a mais configurações!</h2>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. 
                        Numquam placeat ducimus doloribus magni vero non quibusdam explicabo,
                    itaque fugit a tempore culpa totam saepe vitae in corrupti. Nisi,
                    non similique.</p>
                </div>
                <div class="intro-img">
                    <img src="/assets/img/intro-img.svg" alt="Desenho de uma mulher mostrando um aplicativo de telefone">
                </div>
        
                <div class="contact-form">
                    <fieldset class="form-grid">
                        <legend>Contact me</legend>
                        <div class="form-group">
                            <label for="first-name">First Name</label>
                            <input type="text" name="first-name" id="first-name" placeholder="First name">
                        </div>
                        <div class="form-group">
                            <label for="first-name">Last Name</label>
                            <input type="text" name="last-name" id="last-name" placeholder="Last name">
                        </div>
                        <div class="form-group">
                            <label for="first-name">Email</label>
                            <input type="email" name="email" id="email" placeholder="Email">
                        </div>
                        <div class="form-group full-width">
                            <label for="first-name">Message</label>
                            <textarea name="message" id="message" 
                            cols="30" rows="10" placeholder="Message"></textarea>
                        </div>
                        <div class="form-group" style="text-align:center">
                            <button type="submit">Send message</button>
                        </div>
                    </fieldset>
                </div>
            </div>
        </section>

Here are some pictures of how wrong it is:

Last picture

As you can see in the last image, there is a blue space above the image, which should be the maximum width of the content, I should not be able to scroll, the content should be adjusted automatically on the screen ۔

Leave a Reply

Your email address will not be published.