Design an introduction page with a responsive layout

After deciding to create a portfolio website, I came across an example that I liked and decided to replicate its style. However, I encountered an issue with responsiveness. When you resize the window on my site (https://olaolu.dev), everything changes size automatically in a similar way to "object:contain", but not quite right. Can anyone help me fix this?

Here is my code:

<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="/b/cs.css">
</head>
<body>

    <section class="section-top">

        <img class="main1-img" src="/b/images/pngtree-portfolio-memphis-playful-abstract-pink-image_593412.jpg ">
        <h2>faxraddin</h2>
        <h1>Frontend</br> Developer.</h1>
        <h3 class="profession-info">I like to craft solid and scalable frontend products with great user experiences.</h3>
        <img class="my-img" src="/b/images/Screenshot 2022-11-04 at 19.35.20.png">
        <div class="some-info">
            <span>Highly skilled at progressive
                enhancement, design systems &
                UI Engineering.
            </span>
            <span>Over a decade of experience
                building products for clients
                across several countries.
            </span>
        </div>
        <div class="btn-container">
            <ul>
                <li><a></a></li>
            </ul>
        </div>


    </section>

    <script src="/b/js.js"></script>

</body>
</html>

CSS:

body {
    margin: 0;
    padding: 0;
}

.section-top{
    contain: size;
    position: relative;
}

.main1-img{
    width: 100%;
    height: 666px;
    position: relative;
}

.section-top h2{
    position: absolute;
    top: 0;
    padding: 20px;
    padding-left: 100px;
    font-size: 2.5rem;
    color: rgb(32, 166, 166);
}

.section-top h1{
    position: absolute;
    top: 20%;
    left: 10%;
    font-size: 4.5rem;
    color: rgb(32, 166, 166);
}

.profession-info{
    position: absolute;
    top:48%;
    left: 10%;
    color: rgb(32, 166, 166);
    width: 25rem;
}

.my-img{
    width: 333px;
    position: absolute;
    right: 22%;
    top:23%;
}

.some-info{
    position: absolute;
    top: 65%;
    display: flex;
    justify-content: space-between;
    width: 30rem;
    left: 10%;
}

.some-info span{
    width: 50%;
    margin-right: 10%;
    color: rgb(8, 105, 105);
}

@media  screen and (max-width:700px) {
}

Answer №1

The first step in addressing the issue you have outlined is to include the following tags in your <head> section.

    <!-- Necessary meta tags for optimization -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

Answer №2

Hold on, are you suggesting that everything should decrease in size as the window is resized? Could you clarify what exactly your concern is?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The web server is unaware of the CSS and JS references

After loading my ASP.NET MVC project on the web server, I encountered an issue where none of my CSS and JS references were loaded. Some of the references in my default layout are listed below: <head> <link href="/Scripts/css/bootstrap ...

Using regular expressions in PHP to identify HTML elements containing '<p>' that appear after the initial '<H1>' tag

Can you provide guidance on creating a Regular Expression in PHP to identify HTML <p> elements that come after the initial <H1> tag? Here's an example that checks for inequality with the expression: if(!preg_match_all('#<p(.*?)&l ...

Avoiding clashes between CSS styles in web applications

As I work on developing a web application that can be embedded on external websites, one of the challenges I am facing involves constructing dialogues with their own unique stylesheets. This could potentially lead to conflicts if both my dialogue container ...

Issue with AngularJs failing to display data

As a newcomer to AngularJS, I am looking to utilize AngularJs to display the Json output from my MVC controller. Here is the code snippet for my MVC Controller that generates Json: [HttpGet] public JsonResult GetAllData() { ...

HTTrack displays an error message indicating that the file cannot be located

After downloading a website using HTTrack with the command below: /usr/local/bin/httrack https://www.website.com -O /Users/mainuser/Desktop/website -n -j I located the index.html file in the website folder and attempted to run it. However, Chrome display ...

Retrieve particular data points from the object based on its unique identifier

Hey there, I'm facing an issue with Angular where I need to retrieve a specific object from an array based on its ID. I'm quite lost on how to approach solving this problem. var Obj = [ { Id: "1", shape: "circle", color: "red" }, { Id: " ...

Guide on altering the background color of dynamically generated textboxes in R Shiny

textInput(paste0("inp1-", wid),label = NULL,value = record$Current_week) This code was used to dynamically generate text input boxes, where the id for each box is determined by a number called wid. I attempted to change the background color using the fol ...

I am attempting to properly arrange my navigation links and logo in alignment

I need help aligning the logo in the exact center while keeping the navigation links as they are. Here is how it currently looks: https://i.stack.imgur.com/qOgVJ.jpg My CSS: .logo { display: inline-block; text-align: center; } na ...

Exploration of JavaScript's Map capabilities

let information = [{ id: 22, cno: 1, username: 'white', name: 'New Complaint', stype: null, cname: 'ff', product: 'ff', }]; let updatedInformation = information.map(item => { return ({ cno: item.c ...

Converting a floating point number to a 4-byte hex string in JavaScript and reversing the process

I have received a hexadecimal data from the server side that is supposed to be in float format. I am trying to convert these hexadecimals into floats using JavaScript, but so far I have been unable to find a suitable method. Can anyone provide assistance ...

Validating phone numbers using AngularJS

Seeking validation for phone numbers based on specific conditions: - If all 10 digits are identical, show an error message. - If it begins with the number 1, display an error message. Have you encountered a similar scenario? Please share your sug ...

I'm experiencing difficulty positioning my iframe within its section container as it appears to be placed outside of it

I'm struggling to understand why my iframe is positioned outside of the designated section. Check out my GitHub Pages site here and view the repository here. Any assistance would be greatly appreciated! https://i.sstatic.net/eNen2.png ...

What is the best way to transform a JavaScript file retrieved from a remote server (returned as a string) into a standard JavaScript object in a Node

Is there a way to convert a JavaScript file fetched from a remote server (which is in string format) into a regular JavaScript object in Node.js? I know that I can use JSON.parse to convert a JSON string into a dictionary, but in this case, the file contai ...

Transparent CSS Table Styling

Can you create a CSS effect where all content inside a table becomes transparent on hover? For example: <table><tr><td> AN IMAGE </td> <td> SOME TEXT </td></tr></table> So if either the image or the text ar ...

Directly transfer image to Cloudinary without creating a local file

I have integrated jdenticon to create user avatars upon signup in a node/express app. When working locally, I follow these steps: Create identicon using jdenticon Save the file on my local machine Upload the local file to cloudinary Here is a snippet o ...

How can I eliminate the tiny white square located beneath the scrollbar track?

`::-webkit-scrollbar{ width: 12px; } body::-webkit-scrollbar-track{ background: #f1e9e9; border-radius: 10px; margin-block: 0.1875rem; } ::-webkit-scrollbar-thumb{ background-color: #582965; border-radius: 10px; border: 3px so ...

What are the advantages of implementing HTML5 canvas for animation?

I'm a beginner in html5 and I've recently been experimenting with the canvas element. Can anyone provide insight on when the canvas would be most beneficial or practical to use? Essentially, what are some scenarios where it is recommended to util ...

deactivating image mapping on mobile media screens

I'm looking to disable my image map on mobile screens using media queries. I've attempted to include some javascript in the head of my html file, but I encountered an error: <script src="http://code.jquery.com/jquery-1.11.3.min.js"></s ...

Limiting the types of files a user can access through a web browser

Hey there! I have a unique question that sets it apart from others, as it involves restricting file types for users with a browser popup. My goal is to prevent users from selecting certain file types before they choose a file. I've come across some s ...

Is it possible to execute the Go compiler within a web browser?

Just discovered that Go can be compiled to WebAssembly. How awesome! According to this Go documentation, the Go toolchain is actually written in Go itself. This got me thinking, is it possible to run the Go compiler in a browser? Can I create a website w ...