Struggling to get the column filled with color

Can someone help me with styling my column in HTML? I'm trying to make the entire column grey, but only half of it is showing as grey. Here is what it currently looks like: Screenshot. I've attempted setting a background color for the column class but it didn't work. Any suggestions on how to fix this?

The section of HTML that needs fixing:

HTML:

<div class = "row">
    <div class = "column1">
        <div class = "sidenav">
            <h2 id = "CSUSMCourses">California State University of San Marcos Courses</h2>
                <button id = "button"> First Year</button>
                <button id = "button2"> Second Year</button>
                <button id = "button3"> Third Year</button>
                <button id = "button4"> Fourth Year</button>
            <h2 id = "CommunityCollege">Community College Courses</h2>
                <button id = "button5"> SaddleBack Community College</button>
                <button id = "button6"> IVC Community College</button>
        </div>
    </div>

This is the CSS code where the issue might be arising from:

CSS code:

body 
{
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}
.header
{
    padding-left:16px;
    text-align: center;
}
  
.topnav 
{
    overflow: hidden;
    background-color: #333;
}
  
.topnav a 
{
    float: left;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}
  
.topnav a:hover 
{
    background-color: #ddd;
    color: black;
}
  
...

Answer №1

To fully utilize the available space, consider setting the height of column1 to 100vh rather than just 100.

.column1{
    height: 100vh;
}

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

Using jQuery and Regular Expressions to modify the styling of the initial few words

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor ...

Is it necessary to have aria-checked attribute on a physical checkbox?

I've come across many instances of customized checkboxes that utilize the 'aria-checked' attribute. However, I am curious if it is necessary to include this attribute when using input type=checkbox? Will the checkbox still be accessible to s ...

Safari browser is experiencing issues with CSS positioning

I am currently working on a website where I am using CSS to position a specific element on the page. The element is absolutely positioned and contained within a relatively positioned parent element. While it displays correctly in Firefox and IE, there seem ...

Design a styled rectangular tab using CSS

Does anyone know of any cool CSS techniques for achieving the tabbed rectangle appearance depicted in the image below? While it's clear that accomplishing this with just one div is not possible, is there a more efficient method than layering one div ...

Having trouble with a basic select tag and options not functioning properly in Chrome browser

I encountered an issue where I am unable to expand a simple select tag in Chrome. <select id="filterCategory" class=""> <option>1</option> <option>2</option> <option>3</option> <option>4</option ...

Creating a compilation of HTML file links using Gulp

Is there a way to utilize Gulp in order to compile a single HTML file containing links to all pages within a specific directory? For instance, if I have two files contact.html titled "Contacts" and faq.html titled "Frequently asked questions" located in t ...

The request for http://localhost:3000/insert.js was terminated due to a 404 (Not Found) error

As someone new to web development, I am currently tackling a project where I'm having trouble loading the Javascript file insert.js. The HTML document upload.html resides in the public folder, while the Javascript file is located in the main folder. I ...

Issue with PrimeFaces radiobutton styles not updating after being clicked programmatically

My setup includes a p:selectOneRadio constructed like this: <p:selectOneRadio id="positionRadio" value="#{employeeBean.empPosition}" converter="#{empPositionConverter}" layout="custom" required="true" requiredMessage="Please select ...

Tips for keeping the footer firmly planted at the bottom of your Bootstrap 4 page

I have a question that might sound familiar! I want my footer to sit at the bottom of the page, but not remain fixed in place when I scroll. I'm aiming for a footer similar to what you see at the bottom of this webpage Footer Example. Here's the ...

"I am looking for a way to retrieve dynamic data from a (click) event in Angular. Can

Within my component, I have a video loaded in an i tag on a click event. The challenge is accessing the video ID from the video.component.ts file in order to dynamically load a new video. The solution has been elusive so far. <li *ngFor="let video of c ...

How can I fix my HTML Image input not redirecting when clicked?

I have successfully implemented the following code: <input type="button" name="btnHello" value="Hello" onclick="Test();"/> Here is the JS function that accompanies it: function Test() { window.location.href = "Page2.aspx"; } Initially, clicking ...

What is the best way to send user input text to a Vue method using v-on:change?

I am trying to pass the input value from my HTML to a Vue method called checkExist(). I need to get this value within the checkExist() method. Can anyone provide advice on how I can achieve this? I am new to Vue and could use some guidance. HTML: <inp ...

Tips for avoiding background image movement during transitions

How can I prevent the background image from jumping effect during animation looping? What I have already attempted: Switching animation type from transition to position change (left: 0 -> left: -100%) Replacing the background image with a background gr ...

A Step-by-Step Guide to Downloading Images by Clicking

Having an issue with my image download code. When I try to download an image, the process starts but doesn't complete and no file is received. Instead, a type error is encountered. <html> <head> <script type="text/javascript"> funct ...

Unable to successfully submit an HTML form following the utilization of a JavaScript script

I am currently working on an HTML site with some complex functionality. Here is a snippet of my code: <html> <head> <link rel="stylesheet" href="~/Content/index.css" /> <link rel="stylesheet" href="~/Scripts/fancyBox/source/jq ...

Internet Explorer 11 is experiencing difficulties containing elements within the card-footer

I have designed a form that is enclosed in a Bootstrap 4 Card like this: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/> <div class="container"> <div class="row card"> ...

Choose and adjust the size of images with a specific aspect ratio using jQuery

As I work on my Tumblr blog, I am experimenting with using jQuery to target photo entries (imgs) based on specific aspect ratios and resizing them accordingly. To be more precise: If an image's width exceeds 250px, it should be resized so that the h ...

Tips for choosing upcoming dates in a date picker plugin

Currently, I am implementing the jQuery Date Picker plugin on my website. I would like to provide users with the ability to select a date from the past, specifically within the range of the last 2 days. I have attempted to use the max date option for thi ...

What is the best way to implement responsive html within the Avada theme?

Greetings! Is there a way to apply HTML/CSS code in the Avada theme on WordPress while ensuring it is responsive? Kindly refer to this image. https://i.sstatic.net/GMmg7.jpg ...

Creating a regular expression pattern like (+971) 556-123456 to validate phone numbers in an HTML5 form

Looking to validate phone numbers for the UAE in the format (+971) 556-123456 using HTML. ...