Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0125-preview· OpenAIAi2 WildChat-4.8M (AI2)

make html and css for 1920x1080 image with two images and text below them ( on left and…

  1. User

    make html and css for 1920x1080 image with two images and text below them ( on left and on right), images should be centerer verically, on center there should be text "VS" and below it small text "best of 1"

  2. Assistant

    Sure, I'll guide you through creating a simple HTML and CSS design as per your request. Note that the specifics of how it looks will depend on your particular images and their sizes, but I'll assume we're using placeholder images that can easily be replaced with your own.

    Here's a basic setup to achieve what you described:

    HTML (index.html):

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Image VS Image</title>
        <link rel="stylesheet" href="styles.css">
    </head>
    <body>
        <div class="container">
            <div class="image-container left">
                <img src="your-image-left.jpg" alt="Left Image">
                <p>Your Text Here</p>
            </div>
            <div class="vs-container">
                <p class="vs-text">VS</p>
                <p class="best-of">best of 1</p>
            </div>
            <div class="image-container right">
                <img src="your-image-right.jpg" alt="Right Image">
                <p>Your Text Here</p>
            </div>
        </div>
    </body>
    </html>
    

    CSS (styles.css):

    body, html {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .container {
        display: flex;
        justify-content: space-around;
        align-items: center;
        text-align: center;
        width: 1920px;
        height: 1080px;
    }
    
    .image-container {
        flex: 1;
    }
    
    .image-container img {
        max-width: 100%;
        /* Adjust this to control the image's vertical alignment */
        vertical-align: middle;
    }
    
    .vs-container {
        flex-grow: 0;
        flex-shrink: 0;
        width: auto;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .vs-text {
        font-size: 48px;
        font-weight: bold;
    }
    
    .best-of {
        font-size: 24px;
        margin-top: 10px;
    }
    
    /* Ensures the images and text are centered vertically */
    .image-container, .vs-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    

    Make sure to replace "your-image-left.jpg" and "your-image-right.jpg" with the paths to your actual images. Adjust the .image-container img's max-width property to manage the image sizes and the VS text size and positioning within the .vs-text and .best-of classes.

    This is a starting point. Depending on your exact needs (e.g., more responsive design, more specific positioning), you might need to adjust or enhance this code.