Attempting to incorporate text into a CSS Grid

I am currently experimenting with creating a grid layout inspired by a resume design.

Essentially, my grid consists of 2 columns - one set to 1 fraction and the other set to 3 fractions.

The column with 1fr contains section titles, while the 3fr column holds all the content. Within one of the 3fr sections, I have implemented a display: flex property to create a two-column layout.

Each segment is contained within a div section.

While it looks great when adding the first job entry, subsequent entries stack on top of each other instead of appearing in their own rows within that section. I want them to neatly line up next to each other without overlapping.

Should I establish another grid within that specific row to achieve this effect?

Your assistance would be highly appreciated. Please refer to my full Codepen for more details:

Resume Codepen

.container {
  display: grid;
  max-width: 82em;
  max-height: auto;
  margin: auto;
  grid-template-areas: "head head"
                       "nav nav"
                       "about about-info"
                       "work work-info"
                       "education education-info"
                       "skills skills-info"
                       "footer footer";
  grid-template-rows: 300px 50px 12.50em 31em 500px 500px 50px;
  grid-template-columns: 1fr 3fr;
  grid-gap: .075em;
  background-color: white;
}

.work-info {
  border: 1px solid black;
  grid-area: work-info;
  display: flex;
}

Answer №1

To organize your code better, simply add 'work-info' elements inside a separate 'section/div' and update the

grid-template-rows: 300px 50px 12.50em auto 500px 500px 50px;

For a live example, check out this link: https://codepen.io/anon/pen/GGZPPy?editors=1100

Answer №2

It appears that you are aiming to consolidate all content into a single CSS grid, however, this may not be necessary.

Instead, consider showcasing each <section> individually using display: grid.

This way, you can tailor the grid for each section according to your requirements in the CSS stylesheet.

Here is an Example:

body {
font-family: arial, helvetica, sans-serif;
}

h2 {
font-size: 18px;
}

h3, p {
font-size: 16px;
}

header, main section {
padding: 0 6px;
box-shadow: 2px 2px 3px rgb(127, 127, 127);
}

main section div {
padding: 4px 6px;
border-right: 1px solid rgb(227, 227, 227);
}

main section div:last-of-type {
border-right: none;
}

main section {
display: grid;
max-width: 82em;
grid-template-columns: 25% 75%;
margin-bottom: 24px;
}

main section.work {
display: grid;
max-width: 82em;
grid-template-columns: 25% 25% 50%;
grid-template-rows: repeat(2, auto);
}

main section.work div:nth-of-type(1) {
grid-area: 1 / 1 / span 2 / 2;
}
<header><h1>Resume</h1></header>

<main>  
<section class="about">
<div>
<h2>Nylma Jorns</h2>
<p>Reading and Writing Specialist</p>
</div>
    
<div>
<p>Caring, enthusiastic educator dedicated to student development and the learning experience. Skilled in providing quality instruction and facilitating student growth.</p>

<p>Objective: To leverage teaching skills acquired in elementary education to foster self-reliant problem solvers and lifelong learners amongst students through rigorous and data-driven instruction.</p>
</div>
</section>
  
<section class="work">
<div>
<h2>Work Experience</h2>
</div>
  
<div class="work-title">
<h3>Teacher</h3>
<p class="small">Fort Worth Independent School District</p>
<p class="small"><strong>Period:</strong> 2011 - Present<br>
<strong>Job type:</strong> Full-Time<br>
<strong>References:</strong> Seretha Lofton, Mrs. Staten</p>
</div>
    
<div class="work-description">
<h3>1st, 3rd, and 4th Grade Teacher (ESL, Self-Contained, Departmentalized, Two-Way DL, Team Teacher)</h3>

<ul>
<li>Responsible for organizing, teaching, and implementing curriculum</li>
<li>Utilized student data analysis to meet diverse needs</li>
<li>Implemented various instructional methods effectively</li>
<li>Established positive discipline plan</li>
<li>Led Professional Learning Communities</li>
<li>Knowledgeable of TEKS and academic expectations</li>
</ul>
</div>

<div>
<h3>Reading and Math Interventionist, K-8th Grade</h3>
<p class="small">Catapult Learning</p>
<p class="small">
<strong>Period:</strong> 2011 - 2011<br>
<strong>Job type:</strong> Part-Time
</div>

<div>
<h3>Analyzed student data, planned interventions, and provided small-group support using best practices</h3>

<ul>
<li>Responsible for organizing, teaching, and implementing curriculum</li>
<li>Utilized student data analysis to meet diverse needs</li>
<li>Implemented various instructional methods effectively</li>
<li>Established positive discipline plan</li>
<li>Led Professional Learning Communities</li>
<li>Knowledgeable of TEKS and academic expectations</li>
</ul>
</div> 
</section>
     
  
<section class="education">
<div>
<h2>Education</h2>
</div>

<div>Education Details</div>
</section>

<section class="skills">
<div>
<h2>Skills</h2>
</div>

<div>Skills Overview</div>
</section>

</main>

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 creating responsive content within an iframe

I have inserted a player from a website that streams a channel using an iframe. While I have managed to make the iframe responsive, the video player inside the iframe does not adapt to changes in viewport size. Despite trying various solutions found online ...

Discover the best way to simultaneously trigger or detect all instances of a component when it is used multiple times in Ember

I have developed a unique custom component that allows users to type and choose from a dropdown menu. The dropdown menu is created dynamically using a div element. I have successfully implemented functionality to close all open dropdown menus when clicking ...

Utilize jQuery append() to create a grid layout using <td> tags

I need to integrate address information from an object into an HTML table using the append() method. The initial HTML table structure is as follows: <table class="shipping_information" border="1"> </table> To achieve this, I place the addre ...

Is it possible to utilize a hyphen in the link_to attribute?

I'm encountering a dilemma in my Rails app where I need to assign a value to a custom data-* attribute for an anchor tag. The issue is that hashes can't contain hyphens, leading to difficulties with this code: <%= link_to 'Example', ...

What is the best way to align a tweet in the middle of

When using Twitter to embed a tweet, the code provided is necessary. An example of this can be seen below: <blockquote class="twitter-tweet"><p>NoSQL space gradually becoming SlowSQL space.</p>&mdash; Big Data Borat (@BigDataBorat) & ...

Creating an AngularJS directive specifically for a certain <div> tag

Recently, I began learning angularjs and came across a script to change the font size. However, this script ended up changing all <p> tags on the entire webpage. Is there a way to modify the font size of <p> tags only within the <div class=" ...

Is there a way to have the inline form appear on the same line as the buttons?

Currently, I am working on developing an app using Bootstrap 4. In my layout, I have 3 buttons and an inline form. However, the form is displaying below the buttons instead of being in the same line. Can anyone provide guidance on how I can ensure that a ...

Accessing information from a database and showcasing it within a tooltip

I have successfully implemented a tooltip feature using JavaScript and integrated it into an HTML page. Check out the code snippet below: $(document).ready(function () { //Tooltips $(".tip_trigger").hover(function (e) { tip = $(this).find('.tip&a ...

Issues with button hover causing background transition difficulties

I've been trying to achieve a smooth background image transition upon hovering over my buttons. Despite searching for solutions in various posts, I haven't been successful in applying any of them to my code. I realize that J Query is the way to ...

Is there a way to maintain the original style of an HTML element when printing it?

When attempting to print an HTML element using window.print();, the original style is not preserved. How can this issue be resolved? printInvoice() { var mywindow = window.open("", "PRINT"); mywindow.document.write("<html>"); mywindow.d ...

The information about the property is not appearing on the screen

I included the following CSS: nav label:AFTER { content: " ▾"; } However, when viewed in Chrome, it appears like this: content: " â–¾"; I have already added <meta charset="utf-8"/> to my JSP page and @CHARSET "utf-8"; in my CSS file. ...

When attempting to access the callback response with HTML tags from the server, the AJAX request in jQuery fails

I am currently facing a challenge while working on an ajax form submission that returns Json response. Everything functions smoothly except for a specific situation where I need to include HTML content in the response, such as a URL link for users to acces ...

Tips for converting binary image data stored in a database and viewing the images on a web browser

I'm currently working on a web application where users can upload images that are then saved as binary data in my MongoDB using Multer. The issue I'm facing now is how to retrieve and display these images on the webpage. When I try to use the img ...

What is the best way to achieve maximum clarity in a div element while adjusting opacity?

Is there a way to have a div with an opacity of 40%, but make the text inside the div show with an opacity of 100%? #box { Background-color:#000; Opacity:40%; } ...

centered logo in a flexbox header

Having trouble with Flex for the first time. Despite reading and experimenting, I still can't figure it out. Any suggestions on how to accomplish this? Check out an example ...

The CSS styling is not being rendered correctly on the AngularJS HTML page

Encountering a puzzling situation here. Our angular controller is successfully delivering data to the page, but we are facing an issue with rendering a table due to an unknown number of columns: <table border="1" ng-repeat="table in xc.tables"> ...

"Struggling with setting the default checked state for single and multiple checkboxes? The ng-init method with checkboxModel.value=true seems to be ineffective – any suggestions

<input type="checkbox" ng-model="isChecked.value" ng-true-value="'yes'" ng-false-value="'no'" ng-click='handleCheckboxChange(isChecked.value, idx);' ng-init="isChecked.value=true" /> ...

"Customize your Vuetify v-card with uniquely styled rounded corners on only

I am seeking to create a unique v-card design where only two corners are rounded. Despite my attempts, the card ended up rotated by 90° and didn't achieve the desired outcome. DESIGN ATTEMPT: <div class="text-center rotate-ninety ml-n6" ...

``There seems to be an issue with the functionality of the href link

Currently, I am utilizing purecss to design colorful buttons on my website. However, I am encountering an issue where the href link is not clickable even though the button displays correctly. <button class='pure-u-1 pure-button pure-button-primary ...

Close button for body

I have created a form that floats in the center of the screen On this form, I have included a button designed to close it However, I would like for the form to be closed anywhere on the screen when clicked with the mouse Here is my code: $(".offer-clo ...