Having trouble adjusting the grid's width property

My personal page features a section dedicated to displaying my skills and proficiency in various programming languages (although it may not be entirely accurate). I am struggling to adjust the width of the Skill grid to match the layout of the other grids on the page.

Here is the current layout for reference: https://i.sstatic.net/0wqMs.png

Here is the desired layout (replacing email with skills): https://i.sstatic.net/geJrk.png

Link to the code:

https://codepen.io/wodosharlatan/pen/OJwQNLL

I managed to adjust the contact section using grid-column: span 2;, however, this method does not work for the skills section. I also attempted to set the grid width to 100% without success.

Any assistance or suggestions would be greatly appreciated. Feel free to request more code if needed.

Answer №1

When setting up the grid for "medium devices," it seems you have mistakenly used two columns instead of one.

.about__container,
.skills__container,
.portfolio__content,
.contact__container,
.footer__container {
    grid-template-columns: repeat(2, 1fr);
}

To correct this, replace the code in your media query for medium devices with the following:

.about__container,
.skills__container,
.portfolio__content,
.contact__container,
.footer__container {
    grid-template-columns: 1fr;
}

It's important to note that these are combined selectors affecting other containers as well. However, I assume your intention is to achieve full width for medium devices.

P.S.

grid-template-columns: repeat(2, 1fr);

The above code creates two equal columns, which is equivalent to:

grid-template-columns: 1fr 1fr;

Lastly, remember to clean up any code related to spanning columns.

Answer №2

There appears to be an additional layer of wrapping within the skills__container, which may not be correctly applying the layout to its content.

Check out the modified demo here: codepen

To rectify this issue, try eliminating the surplus wrapping layer:

<div class="skills__container container grid">
  <!-- Removed extra wrapper 👉 <div> -->
  <!--==================== SKILLS 1 ====================-->
  <div class="skills__content skills__open">
  ...
  ...
  </div>
  </div>
  <!--==================== SKILLS 2 ====================-->
  <div class="skills__content skills__close">
  ...
  ...
  </div>
  </div>
  <!--==================== SKILLS 3 ====================-->
  <div class="skills__content skills__close">
  ...
  ...
  </div>
  </div>
  <!--   </div> -->
</div>

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

Tips for successfully accessing a variable in an Angular Pipe

When displaying output, I need to show a specific number of decimal digits based on the length returned by a stored procedure. The length of these decimal digits can vary, and I only need to focus on the decimal part, not the integer part. To achieve this, ...

Firefox 3 fails to utilize cache when an ajax request is made while the page is loading

Upon loading the page DOM, I utilize jQuery to fetch JSON data via ajax like so: $(document).ready(function(){ getData(); }); ...where the function getData() executes a basic jQuery ajax call similar to this: function getData(){ $.ajax({cache: t ...

The select tag is malfunctioning in the Firefox browser upon clicking with the mouse

One of the select tags in my application is causing issues in Firefox browser. Although all other select tags in different pages work fine, this particular page seems to be problematic. When attempting to change the option in the select tag, it fails to r ...

A guide to mastering Nested Table creation in Angular

I'm in the process of creating a dynamic table using an array of data let data = [{ "criterialimitId": "3", "criteriaName": "Test", "criteriaId": "1", "criteria": "Max Wager", "type": "DAILY", "oprLimit": "2.5", "status": "1", "acti ...

When the content in the div exceeds its boundaries, it causes it to overlap with

In my design, I have a top menu with a z-index of 999 to ensure nothing covers it. However, I am facing an issue where a scrolling div is appearing on top of the menu bar even though it shouldn't. Any idea why this is happening? Here is the CSS for t ...

Creating a rotating wheel using JavaScript that is activated by a key press event

I need some help with implementing a keystroke event in this code so that the spinning wheel can start based on a key press, like the spacebar. Any suggestions on how to achieve this? I have found an event code for keystrokes in JavaScript: document.body. ...

Transforming JSON/XML into a hierarchical display

I've come across the following XML file: <Person attribute1="value1" attribute2="value2"> value3 <Address street="value4" city="value5">value6</Address> <Phone number="value7" type="value8">value9</Phone> </Pers ...

How to efficiently upload multiple files simultaneously in Angular 10 and .NET Core 5 by utilizing a JSON object

I have a JSON object structured like this: Class->Students this is a basic representation of my TypeScript class export class Classroom { Id:number; Name:string; Students:Student[]=[]; } export class Student { Name:string; Age:number; Sex:string; Imag ...

execute the function after the animation has finished

Is it possible to trigger a function once an animation is complete using jQuery? Here's the code I'm working with: $('html, body').animate({scrollTop:$("body > .addAccountForm1").offset().top }, 'slow'); I want to execut ...

What is the best way to eliminate particular elements from a nested JSON payload in JavaScript?

I am in need of creating a function that can scan through a nested JSON structure to locate specific elements and delete all occurrences of those elements, even if they are within an array. Consider this JSON example: { "userId": "John991", "grou ...

Unable to successfully import an external HTML file that contains a script tag

I am currently experiencing an issue with my index.html <!doctype html> <html lang="en"> <head> <meta charset="utf-8> <title>MyApp</title> <link rel="import" href="./common.html"> </head> <body> ...

Tips for adjusting the CSS styles within a jQuery plugin

I need some help with styling the form on my test page located at While using FireBug, I noticed a lot of padding space surrounding the tabs within this div: <div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> How can I redu ...

Saving the initial and final days of each month in a year using javascript

I am trying to create an array of objects that contain the first and last day of each month in the year. I have attempted a solution but have hit a roadblock and cannot achieve the desired results. module.exports = function () { let months_names = ["j ...

Obtain the name of the object method from inside the method itself

Imagine having an object like this: var app = {} inside which there is a method: app = { initialize: function () { } } Is it possible to retrieve the name of the method 'initialize' from within the initialize() function without explicit ...

Upon utilizing JSON.parse in Express, an unexpected token < in JSON was encountered at position 0 while attempting a client side fetch POST

I'm trying to send a basic object through a fetch request to my express server, but I keep encountering an error when attempting to log it. Currently, if I log req.body (with the header 'Content-Type': 'application/x-www-form-urlencode ...

Why is it that I am unable to utilize the post data stored in $var within my PHP document when making an Ajax call?

Hey there! I've got this function that makes an ajax call. But, for some reason, the $value I'm passing isn't defined in my showuser.php file. Can you help me figure out why? function showUser2(value) { var xhr = new XMLHttp ...

With jQuery's .text() method, it is possible to modify the first span's Bootstrap class, but not the

As someone who is new to javascript, html, and jquery, I have been trying to change the text of 2 span elements in the same div using jquery's .text() command. Despite going through various solutions provided by different questions, none seem to work ...

Instructions on how to save HTML "innerHTML" along with attributes to a text document

I'm currently developing an HTML export feature from a DIV tag that includes various elements and attributes. HTML: <div id="master"><span class="classname">content goes here</span></div> <span class="download" onclick="ca ...

Angular2: dynamic spinner directive for showing progress/loading overlay

Struggling to implement a loading indicator/overlay in Angular2 that can be added to any container div. When the boolean property isLoading changes, I want the div to grey out and display a spinning indicator, then revert back when the property changes. I ...

Display event using Angular

I am currently working on an Angular project where I need to print a specific area of the page. While I know that this can be done using media CSS, it is causing issues for me due to the numerous print functionalities present in the project. I am attemptin ...