Trying to add Text to CSS Grid - css

I am trying to create a grid template in the style of a resume.
Basically, I have a grid that has 2 columns 1 fr and 3fr.
The 1fr has the title of the section and the 3fr has all the content.
In of the 3fr sections, I am putting work experience, and I have it laid out so that the there are 2 columns with a property of display: flex
Each is in a section with a div.
Now it looks good when I add the first job but then I add a second job and it layers it on top of first and so on. I want them to be under each other basically in their own row within that section.
How do I make it so that they do not stack on each other but are rather neatly laid one right after another?
Do I need to make ANOTHER grid within that grid row?
Any help would be great please check my Codepen below
(this is just a snippet please see below for full codepen)
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;
}

You just have to add 'work-info' elements into one separate 'section/div' and need to change grid-template-rows: 300px 50px 12.50em auto 500px 500px 50px;
See the following link for working example:
https://codepen.io/anon/pen/GGZPPy?editors=1100

I can see that you are trying to place all of the content into a single CSS grid, but this isn't necessary.
Instead, why not display each <section> using display: grid?
Then you can customise the grid for each section as needed in the CSS stylesheet.
Working 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, and enthusiastic educator with a strong commitment to student development and the learning experience. Excellent background and proven success in helping students reach their full potential.</p>
<p>Objective: To utilize the education and developing skills in teaching I have acquired over the years of teaching within the elementary grade level. To ensure that all students receive quality, rigorous, and data-driven instruction to ensure that all become self-reliant problem solvers. To help all students achieve goals and become life-long learners.</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>Maintain complete responsibility for the organization, teaching, and implementation of Curriculum</li>
<li>Successfully analyze student data to plan accordingly and meet various needs</li>
<li>Successfully implement interventions, centers, whole group, small groups, and technology</li>
<li>Implemented a positive discipline plan which promotes student responsibility and accountability</li>
<li>Lead PLCS to ensure that student achievement is the end goal</li>
<li>Knowledge of TEKS and student 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 using various assessment tools, plan accordingly, and provide interventions in small groups using best practices</h3>
<ul>
<li>Maintain complete responsibility for the organization, teaching, and implementation of Curriculum</li>
<li>Successfully analyze student data to plan accordingly and meet various needs</li>
<li>Successfully implement interventions, centers, whole group, small groups, and technology</li>
<li>Implemented a positive discipline plan which promotes student responsibility and accountability</li>
<li>Lead PLCS to ensure that student achievement is the end goal</li>
<li>Knowledge of TEKS and student expectations</li>
</ul>
</div>
</section>
<section class="education">
<div>
<h2>Education</h2>
</div>
<div>Education Stuff</div>
</section>
<section class="skills">
<div>
<h2>Skills</h2>
</div>
<div>Skills Stuff</div>
</section>
</main>

Related

Flexbox columns align two top, two mid and two bottom without container & undesired gaps CSS only

This is a setup for my amp portait pages(just fyi).
Setup: For a flexbox who puts the items by default at bottom in column format.
Lets say i have 5 elements as an example and have 3 classes: top, mid & bottom(by default not needed as .container is just-content:flex-end).
h2,h3 { padding:0; margin:0; border-top:1px solid gray }
.flex { height: 100%; min-height:460px;
display: flex; justify-content: flex-end; flex-direction: column; width:320px; }
.top{ }
.mid { }
.btm { }
<div class="flex">
<h2 class="top">Top Heading 2</h2><p class="top">Top para</p>
<h3 class="mid">Mid Heading 3</h3><p class="mid">mid para</p>
<h3 class="btm">Btm Heading 3</h3><p class="btm">bottom para</p>
</div>
Problem: What should be .top, .mid & .bottom such that they come top:goes to top(without undesired margins), mid: exact mid(not mid of left space) & any pending items at bottom.
I have created a jsfiddle for this.
Have messed around 2 days to fix, but one or other thing goes wrong, hence finally asking for help.

CSS displaying correctly in localhost site, but not on actual website

Firstly, I am still learning and fairly new to this profession so feel free to correct the code I have that is wrong.
The issue I have is that on my localhost solution, my css grid code is working the way I want it to (see 1st pic below). When it's uploaded, it is not (see 2nd pic below). I have used a method found on another website (https://css-tricks.com/new-year-new-job-lets-make-a-grid-powered-resume/) and it works on my CV, but it's not working on my portfolio post.
Should look like this!
picture 1
But looks like this...
picture 2
In specifics, the css file (index.css) is getting called for an id on the parent div that contains all the sections of a grid, but the index.css is not getting called for the class in the parent div, nor is index.css being applied to any of the classes on the sections of the grid. In the localhost, index.css is working correctly across these sections. When I check index.css on the server side, it is up to date and has all the classes that I need which is what is making me scratch my head so much...
What I have tried is a 'hard refresh' (ctrl+f5, shift+f5, etc.), turned my Cloudflare into developer mode, and I have also allowed some time to see if it was just a slow upload on the server side.
HTML code;
<div id="banner">
<!--Title-->
<div class="container py-2">
<div class="col-12 py-0 px-2">
<h3><u>KPI Management Dashboard</u></h3>
</div>
</div>
</div>
<div class="portfolio-sections" id="content">
<section class="grid-area-portfolio portfolio-overview" style="margin-left: 15px;">
<div class="p-3">
<p style="color: #545454;"><b>OVERVIEW</b></p>
<p>
text here
</p>
<p>
text here
</p>
</div>
</section>
<section class="grid-area-portfolio portfolio-role" style="margin-left: 15px;">
<div class="p-3">
<p style="color: #545454;"><b>MY ROLE</b></p>
<p>
<b>Graduate Software Developer</b> for Nant Ltd
</p>
<p>
UI Design, Prototyping, HTML, CSS, JavaScript, PHP, MySQL
</p>
<p>May 2020 - July 2020</p>
Go to the Dashboard Page
</div>
</section>
CSS code (index.css);
#banner {
margin-top: 100px;
width: 100%;
background-color: #ffffff;
/*color: #545454;*/
/*border-top: 2px solid rgba(82,82,82,0.4);
border-bottom: 2px solid rgba(82,82,82,0.4);*/
box-shadow: rgba(0, 0, 0, 0.3) 0 5px 10px 0;
}
#banner h3 {
color: #545454;
border-top: 4px solid rgba(255,255,255, .95);
transition: border-top ease-in-out 0.25s;
border-radius: 3px;
display: inline-block;
}
#banner h3:hover {
border-top: 4px solid #AFFC41;
border-radius: 3px;
}
#content {
margin: 0 auto;
margin-top: 20px;
width: 75%;
padding-bottom: 40px;
background-color: #ffffff;
box-shadow: rgba(0, 0, 0, 0.3) 0 5px 10px 0;
display: grid;
}
.portfolio-sections {
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto;
grid-template-areas:
"portfolio-overview portfolio-overview portfolio-role"
"portfolio-background portfolio-background portfolio-background"
"portfolio-problem portfolio-problem portfolio-problem"
"portfolio-users portfolio-users portfolio-users"
"portfolio-solution portfolio-solution portfolio-solution"
"portfolio-results portfolio-results portfolio-results";
}
.grid-area-portfolio {
padding: 0;
margin: 15px 15px 0px 0px;
position: relative;
}
.portfolio-overview {
grid-area: portfolio-overview;
}
.portfolio-role {
grid-area: portfolio-role;
}
A link to this codepen shows it works there - https://codepen.io/gileswking/pen/abdgOVo
But a link to my actual site shows it doesn't work there - https://www.code-grey.co.uk/portfolio/dashboard_case_study.php
I would appreciate any help, and many thanks in advance.
So it turns out if I click Development Mode on my Cloudflare CDN, it works for 24 hours, then disables itself which implies it's an improper setup on Cloudflare. After going through the setup with a friend, it is now working.

I am trying to wrap my text around my images by floating the images to the left and right but nothing is happening

I am still learning and trying to get my text to wrap around two images, one left and one right, but nothing seems to be changing. I'm not sure what I'm doing wrong! :( Any suggestions are very appreciated!
Here is what it looks like.
.skill-row {
display: inline-block;
width: 50%;
margin: 100px auto 100px auto;
text-align: left;
line-height: 2;
}
.layout-pic {
width: 25%;
float: left;
margin-right: 30px;
}
.phones-pic {
width: 25%;
float: right;
}
<div class="skills">
<h2>My Skills.</h2>
<div class="skill-row">
<img class="circular" "layout-pic" src="images/layout.png" alt="website-layout-pic">
<h3>Create Your Vision</h3>
<p>I create using a complementary focus on color palettes, typography, and quality content. All of these elements help to bring your vision to life and really make it SHINE.</p>
</div>
<div class="skill-row">
<img class="circular" "phones-pic" src="images/seo.jpg" alt="phone-screens">
<h3>Fine Tune Your Vision</h3>
<p>As a developer, I know how to fine tune your website to give your audience the best functionality and visual appeal across devices.</p>
</div>
</div>
Multi classes should be wrapped in one string like :
<img class="one two three"/> ✔
and not like <img class="one" "two" "three"/> this is wrong

Within grid background image affected by content

This is kinda trickt to explain, but I got a nested grid, the grid inside the grid looks lite this:
.footer {
grid-area: footer;
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
}
.bottomdiv {
grid-column-start: 1;
grid-column-end: 2;
text-align: center;
}
.leftdiv {
background-image: url("../images/logo-sbbq4.png");
opacity : 0.2;
background-repeat: no-repeat;
background-size: 20% 100%;
background-position: -60px 0px;
}
.contactlogo {
font-family: Neucha;
font-size: 4vw;
color: #000;
margin: 30% 4vw;
}
I got two problems, first one is probably easy, as you can see I want the bottomdiv to span across the 4 by 4 grid bottom.
The real problem I got is the leftdiv.
I have a backgroud image the I want to place a text above.
The image is placed and all is well but when I try to add the text the margin affects the image - I have placed it under due to CSS Cascadig nature but the didnt help.
The html looks like this:
<div class="footer" id="kontakt">
<div class="leftdiv contactlogo">
My BBQclass
</div>
<div class="rightdiv contacttext">
<ul>
<li>Telefon: 245213654</li>
<li>E-post: me#inter.net</li>
<li>Postgiro: 784512-22</li>
</ul>
</div>
<div class="bottomdiv ustext">Event, butiksevent, personalfester, fester och grillkurser. Kan även göra restaurang-gästspel med burgarna på begäran.</div>
</div>
So here is my noobish problem... wanting your excellent help.

Aligning elements properly

I cannot for the life of me figure out how to make the images within the following code align horizontally across the top. I also need to get the h1's to align the same as well. It seems to behave oddly to me when I use the vertical-align property.
HTML:
<div class='services-banner'>
<div class='service-one'>
<img align='top' src='http://static.squarespace.com/static/515a53e1e4b063d29d1bd369/t/51a17287e4b09448823f89f6/1369535111697/Link%20Icon.png'>
<h1><b>Social Media Marketing</b></h1>
<p class='service-description'>Engage your audience with organic brand growth. We work to connect with your customers through social media and humanize your brand. Our team takes your social media campaign from strategy to action! </p>
</div>
<div class='service-two'>
<img align='top' src='http://static.squarespace.com/static/515a53e1e4b063d29d1bd369/t/51a17290e4b0941ebb86cb78/1369535120489/Web%20Design%20Icon.png'>
<h1><b>Website Design</b></h1>
<p class='service-description'>We offer customized website design to scale your content across platforms. Our design team will produce a clean and focused website. We include search engine optimization, analytics and a intuitive platform to keep your content relevant. </p>
</div>
<div class='service-three'>
<img align='top' src='http://static.squarespace.com/static/515a53e1e4b063d29d1bd369/t/51a1728be4b034b67e50db59/1369535115782/Search%20Engine%20Marketing%20Icon.png'>
<h1><b>Search Engine Marketing</b></h1>
<p class='service-description'>Visibility is everything. Project your brand across the internet with search engine marketing. Our team will customize and execute a potent add campaign. We offer customized text or visuals for your brand! </p>
</div>
<div class='service-four'>
<img align='top' src='http://static.squarespace.com/static/515a53e1e4b063d29d1bd369/t/51a17289e4b0f957dd565595/1369535113477/Review.png'>
<h1><b>Reputation Management</b></h1>
<p class='service-description'>Studies show, product endorsements effect consumer behavior. Our team uses the latest in SEO technology to scour the internet in search of negative press. We create a plan of action to manage reviews by responding to consumers concerns. </p>
</div>
CSS:
.services-banner {
width: auto;
height: auto;
display: block;
position: absolute;
text-align:center;
overflow: hidden;}
.service-description {
text-align:left;
font-weight: 400;
}
.service-one {
width: 225px;
height: 500px;
display:inline-block;
padding: 10px;
background-color: transparent;
}
.service-two {
width: 225px;
height: 500px;
display: inline-block;
text-align:center;
padding: 10px;
background-color: transparent;
}
.service-three {
width: 225px;
height: 500px;
display: inline-block;
text-align:center;
padding: 10px;
background-color: transparent;
}
.service-four {
width: 225px;
height: 500px;
display: inline-block;
text-align:center;
padding: 10px;
background-color: transparent;
}
.services-banner img {
width: 160px;
}
You can see a live example at http://www.ampfly.sqsp.com on the home page. Please excuse the unfinished-ness of the site, its a work-in-progress. Thanks!
Replace display:inline-block; in all your service-one, service-two, service-three and service-four classes with display:table-cell. This will solve your issue.
For instance,
.service-one, .service-two, .service-three, .service-four{
display: table-cell;
}
Here is the Working Solution.
Hope this Helps.

Resources