Why is my CSS Grid still not working correctly even though validation services have confirmed it is 100% correct?

After running my HTML and CSS through the validation services, everything seemed to check out fine. However, when I try to implement the grid layout using the CSS below, it doesn't seem to work as expected:

body {
    display: grid;
    grid-template-columns: 6fr;
    grid-template-rows: 6fr;
    background-color: #f4fff4;
    height: 500px;
}

.Background {
    grid-row-start: 1;
    grid-row-end: 6;
    grid-column-start: 1;
    grid-column-end: 6;
}

#Heads {
    grid-row-start: 2;
    grid-row-end: 2;
    grid-column-start: 2;
    grid-column-end: 5;
    box-sizing: border-box;
}

.Backdrop {
    grid-row-start: 3;
    grid-row-end: 3;
    grid-column-start: 1;
    grid-column-end: 6;
}

.Arrow {
    grid-row-start: 3;
    grid-row-end: 3;
    grid-column-start: 6;
    grid-column-end: 6;
    box-sizing: border-box;
}

.Regis {
    grid-row-start: 5;
    grid-row-end: 5;
    grid-column-start: 2;
    grid-column-end: 3;
    box-sizing: border-box;
}

.Cont {
    grid-row-start: 5;
    grid-row-end: 5;
    grid-column-start: 4;
    grid-column-end: 5;
    box-sizing: border-box;
}

.Refer {
    grid-row-start: 4;
    grid-row-end: 4;
    grid-column-start: 3;
    grid-column-end: 4;
    box-sizing: border-box;
}

Here is a snippet of the HTML code that is supposed to be styled with the above CSS rules:

<!doctype html>
<html>

<head>
    <title>Website Domain Name</title>
    <meta charset="UTF-8">
    <meta name="description" content="All in due time.">
    <meta name="keywords" content="Git, Code, Win, Yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="Hit1.css" rel="stylesheet">
</head>

<body>
    <div class="Background">
        <header id="Heads">
            <h1>Click <a href="http://www.w3schools.com">Here!</a></h1>
            <select>
                <option>Beans</option>
                <option>Cans</option>
                <option>Frijole</option>
                <option>Jaguar</option>
            </select>
        </header>
        <div class="Backdrop">
            <div class="Arrow">
                <p><a href="http://www.w3schools.com"><img src="Arrows.jpg" alt="Arrow"></a></p>
            </div>
            <div class="Regis">
                <p><a href="http://www.w3schools.com">Registration</a></p>
            </div>
            <div class="Cont">
                <p><a href="http://www.w3schools.com">Contact Us</a></p>
            </div>
            <div class="Refer">
                <p><a href="http://www.w3schools.com">References</a></p>
            </div>
        </div>
    </div>
</body>

</html>

If anyone has thoughts or ideas on how to fix the issue, please let me know. Any help is greatly appreciated! Thank you so much! =]

Answer №1

.Backdrop {
    display: grid;
    grid-row-start: 1;
    grid-row-end: 6;
    grid-column-start: 1;
    grid-column-end: 6;
}
.Backdrop div{
    display: grid;
}

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

Interacting with a card in vuejs won't trigger any action

Is there a way to make an overlay disappear when clicking anywhere on the screen except for a specific card positioned on top of it? The current setup makes the overlay disappear even when the card is clicked. How can this behavior be corrected? <div ...

Angular 10 is displaying a message indicating that a font has not been

I'm facing an error in my Angular project when trying to add a font to the SCSS file. How can I resolve this issue? style.scss: @import "~@angular/material/theming"; @include mat-core(); $PWP-primary: mat-palette($mat-indigo); $PWP-accent: ...

Tips for positioning text underneath an image with HTML and CSS

I'm attempting to align two links below an image as text. The HTML I have works perfectly in Chrome and Firefox, but not in IE, where 90% of our internal users are. Here is the code: <div style="float: right;"><img src="sites/default/files/ ...

Issue with border-color in CSS on Chrome tables

Here is a table style I have defined for selected elements: tr[selected] { background: #FFF; border-color: #000000; color: #000000; } To apply this style, I use JavaScript: $this.unbind().change(function () { element = $(this).parent ...

Comparing Yii's CHtml::link() function with the use of regular <a href=''></a> HTML tags

When using elements like yii CHtml::link, what are the recommended practices? I'm working on a button that needs to include an icon, text, respond to hover events, and be wide. Are there any benefits to using CHtml instead of a regular tag that can e ...

The current version of HTML5 Context Menus is now available

I'm in need of implementing the HTML5 Context Menu feature. Currently, only Firefox supports it. My main objective is to add some menu options without replacing the existing context menu. How can I achieve the same functionality now? I am aware of va ...

Achieving vertical alignment and stretching of subchild within a flexbox element

I am in the process of creating a mobile navigation menu using Flexbox. It will be a vertical menu that occupies 100% of the available height, with the navigation items evenly spaced and taking up the entire height. The structure I am using is ul>li> ...

Enable automatic full-screen mode on Google Chrome upon page load

I would greatly appreciate it if you could provide an answer to this question, even if it is marked as a duplicate. I have tried various solutions and sought help, but unfortunately, nothing seems to be working for me... What I really need is for the brow ...

Retrieve the current font style with Kendo UI Editor

Recently, I've been facing some challenges while working with the Kendo UI Editor. Specifically, I'm struggling to retrieve the current font style. My goal is to use JavaScript or jQuery to obtain the following values: Values I am looking for: ...

Using jQuery to make an AJAX request to a Java backend server in order to update and refresh an HTML list

As someone new to using jQuery / AJAX with a Java backend system, I'm looking for guidance on making my first call. I have an HTML list structured like this: <ul> <li>Test 1</li> <li>Test 2</li> <li>Te ...

Run Python scripts on imported files

I am facing an issue with my django application where I need to upload 2 files and run a python script (proto2.py) on them. In the HTML code, I included a button to trigger the file execution but it did not work: <div>Relay 1: <form action=" ...

Placing text and an image within a grid cell does not automatically stack them on top of each other

I have a large div with a grid display, consisting of 3 rows and 2 columns. I am attempting to include text directly below the photo within each cell. This is what my code looks like: <div class="arrange-fixes"> ...

Utilizing HTML/CSS with React/Bootstrap: A Comprehensive Guide

Looking for help with integrating HTML/CSS code into React/Bootstrap? I need assistance with coding in React using Bootstrap. How do I effectively use components and props? Even after installing bootstrap, I am encountering errors. Is it possible to dire ...

Ruby on Rails allows for the selection of values in a dropdown menu to trigger the visibility of different sections of HTML

As a newcomer to Rails, I was able to successfully implement the onclick function for a f.checkbox element. Now, my challenge lies in achieving a similar functionality for a f.select element within a _form. Below is the code snippet that works for a chec ...

Using custom woff2 fonts in Android applications created with Visual Studio Community and Cordova seems to be causing compatibility issues

Help Needed! I am facing an issue with my app created using Visual Studio Community and Cordova. Everything works perfectly when I simulate it on my PC, but when I install it on my phone, the fonts just won't display correctly. I have tried all the s ...

Issues with the styling of DIV elements

Currently tackling a project that involves numerous DIVs and sections, encountering an issue with the header. When I attempt to minimize the browser window, the search bar and panes div are not staying within the "header" section as expected. The structur ...

Retrieve text excluding a specific class or id using jQuery

I need help with extracting text from an HTML div. <div id="example"> I am writing a <span class='outer'>query for help <span class='inner'>on a coding forum</span></span> </div> const te ...

Adjusting the size of images in real time

Currently, I am in the process of creating a Fluid grid style website and I am looking to decrease the size of all images by 75% when the screen is below 1280px, 50% at 800px, and so forth. Is there a way to achieve this using the IMG tag? My attempt so ...

Utilize Xpath to transition between different html tags seamlessly

Here is the HTML snippet I am working with: <pre> <span class="cm-string">"userId"</span> ":" <span class="cm-string">"abc"</span> "," </pre> My goal is to extract the text "abc" from the "userId" tag, which changes fr ...

The hover effect is not activated by the mouse movement event

I previously encountered an issue related to flickering with an absolute div when moving my mouse, which I managed to resolve by increasing the distance between my mouse pointer and the div. Now, I am working on the next phase of my project: My goal is t ...