A few tiny problems have been torturing me for weeks. After many researches and many trials I still can't figure out what to do.
On my online resume, the desktop display if perfect. On mobile though, there are many inconsistencies with font and images sizes.
Link of the page: t.btmx.fr
Problems
If you have an idea what's wrong or if there's something I should learn that would be very helpful :)!
Thank you very much!
Below is the code as asked by Paulie_D. I'm sorry if it's so long I don't know what to remove :(. First you'll find the CSS for small screens using media queries, then the "normal" CSS and then the HTML.
#
media screen and(max - width: 1000px) {
header {
font - size: 1em;
}
p {
font - size: 0.8em;
}
#
contact_button {
font - size: 1em;
}
#
personal - info - and - topskills {
display: flex;
flex - direction: column;
}
#
containermain {
display: flex;
flex - direction: column;
}
.topitem: nth - child(2) {
max - width: 100 % ;
}
.subelementspecial /* floating logo | title */ {
display: flex;
flex - direction: column;
}
}
header {
border-radius: 0.5em;
background-color: #AFC600;
opacity: 0.7;
margin: auto;
margin-bottom: 4em;
padding-bottom: 0.1em;
padding-top: 0.1em;
font-size: 0.8em;
text-align: center;
max-width: 1920px;
}
.bg1 {
background: url("medias/background.jpg") no-repeat top center;
}
.bg2 {
background: #232A2A;
}
#main-wrapper {
width: 100%;
background-attachment: scroll;
background-size: contain;
font-family: "texgyrescholaregular", Verdana, Georgia, serif;
}
#personal-info-and-topskills {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
padding: 2em;
}
.topitem {
border-radius: 0.5em;
padding: 0 1.3em 0.6em 1.3em;
margin: 1em;
}
.topitem h2 {
margin-bottom: 1.5em;
}
.topitem:nth-child(2) {
opacity: 0.9;
min-width: 300px;
background-color: #3D3D39;
border-radius: 0.5em;
/* padding : top right bottom left */
flex-grow: 1;
flex-shrink: 0;
flex-basis: 200px;
max-width: 40em;
}
.topitem:nth-child(2) p {
color: white;
line-height: 2em;
}
.topitem:nth-child(2) strong {
color: #d8616f;
}
#contact_button {
background: #D3D699;
text-align: center;
color: black;
border-radius: 1em;
width: 40%;
margin: auto;
margin-bottom: 1em;
margin-top: 1em;
}
.topitem:nth-child(3) {
background: #C4D9D0;
flex-grow: 0;
flex-shrink: 0;
flex-basis: 400px;
}
.topitem:nth-child(3) h2 {
color: black
}
#languages {
width: 100%;
}
.topitem:nth-child(4) {
background: #e0cece;
flex-grow: 0;
flex-shrink: 0;
flex-basis: 350px;
}
.topitem:nth-child(4) h2 {
color: #b25960;
}
#containermain
/* contains experience, skills and education */
{
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-between;
align-items: flex-start;
padding: 2em;
}
.cmain-element {
background-color: #FCF8F5;
border-radius: 1em;
padding: 0 1.3em 0.6em 1.3em;
margin: 1em;
max-width: 1500px;
/*properties for all the childs*/
}
.cmain-element:nth-child(1) {
flex: 1;
}
.cmain-element:nth-child(2) {
flex: 1;
}
.float-logo-title {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.work-place-time h3 {
margin-top: 0.1em;
}
.logo {
margin-right: 30px;
}
#hobbies-passions {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
align-items: flex-start;
background-color: #FCF8F5;
border-radius: 5px;
width: 40em;
margin: auto;
margin-bottom: 3em;
}
#hobbies-img {
text-align: center;
}
footer {
display: flex;
height: 60px;
border-radius: 5px;
background-color: #546363;
opacity: 0.8;
margin: auto;
max-width: 1920px;
}
#footerbox {
width: 40%;
display: flex;
margin: auto;
justify-content: space-around;
}
#font-face {
font-family: 'texgyrescholaregular';
src: url('font/texgyreschola-regular-webfont.eot');
src: url('font/texgyreschola-regular-webfont.eot?#iefix') format('embedded-opentype'), url('font/texgyreschola-regular-webfont.woff') format('woff'), url('font/texgyreschola-regular-webfont.ttf') format('truetype'), url('font/texgyreschola-regular-webfont.svg#texgyrescholaregular') format('svg');
font-weight: normal;
font-style: normal;
}
h2 {
color: #DE7F89;
font-size: 1.5em;
line-height: 1.5em;
}
h3 {
font-size: 1.3em;
line-height: 1.5em;
}
h4 {
font-size: 1em;
line-height: 1.5em;
}
p {
font-size: 0.9em;
line-height: 1.5em;
}
ol,
ul {
font-size: 0.9em;
line-height: 1.5em;
/* for changing indent
padding-left: 30px;
*/
}
/*strong=default*/
a {
color: green;
text-decoration: none;
font-style: italic;
}
a:hover {
color: green;
}
a:active {
color: red;
}
a:visited {
color: purple;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="smallscreen.css" />
<meta charset="utf-8">
<title>Resume - Thibault Bétrémieux</title>
<link rel="icon" href="http://t.btmx.fr/wp-content/uploads/2016/07/favicon.png">
</head>
<div class="bg2">
<body>
<div class="bg1">
<div id="main-wrapper">
<header>
<h1>Thibault Bétrémieux - Resume as of 16<sup>th</sup> July 2016</h1>
</header>
<section id="personal-info-and-topskills">
<div class="topitem">
<p>
<a href="medias/thibault_betremieux_photo.jpg" target=_blank>
<img src="medias/thibault_betremieux_photo_mini.png" title="click to enlarge :) !" alt="Resume photo Thibault Bétrémieux" />
</a>
</p>
<!-- <a href.../> <Miniature/> </a> -->
<!-- target=_blank open in new link -->
</div>
<div class="topitem">
<h2>Personal information</h2>
<p><strong>About me: </strong>I am a young french expat living in Germany since two years, I speak four languages (French,English,German and Italian)</p>
<p><strong>Date of birth: </strong>24/12/1991</p>
<p><strong>Desired position: </strong>Online marketing or management in an international environment</p>
<p><strong>Place of residence:</strong> Bamberg, Bavaria (Germany)</p>
<a href="http://t.btmx.fr/contact">
<div id="contact_button">Contact me</div>
</a>
</div>
<div class="topitem">
<h2>Languages</h2>
<div id="languages">
<img src=medias/languages_450px.png alt="Languages">
</div>
</div>
<div class="topitem">
<h2>Computer skills</h2>
<h3>Microsoft Office</h3>
<ul>
<li>Word (including Mailing)</li>
<li>Excel (including charts and pivot tables)</li>
<li>PowerPoint (including masks)</li>
<li>Outlook</li>
</ul>
<h3>Internet</h3>
<ul>
<li>HTML5</li>
<li>CSS3</li>
<li>WordPress</li>
</ul>
</div>
</section>
<section id="containermain">
<div class="cmain-element">
<h2>Professional experience</h2>
<div class="float-logo-title">
<!-- is used to put the logo next to the title of work, place, and date-->
<div class="logo">
<p>
<img src="medias/aul_logo.png" alt="Logo Arbeit und Leben NRW" />
</p>
</div>
<div class="work-place-time">
<h3>Project manager (non renewable fixed-term contract)</h3>
<h4>Arbeit und Leben NRW, Düsseldorf, Germany</h4>
<p>05.2015 - 04-2016</p>
</div>
</div>
<ul>
<li>Organization and leading of Franco-German meetings for young people in vocational training – within the Program funded by the Franco-German Youth Office (OFAJ/DJFW) “Work in the partner country”</li>
<li>Animator of some of those meetings and training for the leading of intercultural exchanges</li>
<li>Development of partnerships between “Arbeit und Leben NRW”, socio-political organizations and/or vocational training centers</li>
</ul>
<div class="float-logo-title">
<div class="logo">
<p>
<img src="medias/dialoge_logo.png" alt="Logo Dialoge Sprachinstitut" />
</p>
</div>
<div class="work-place-time">
<h3>Assistant to the school direction (Master internship)</h3>
<h4>Dialoge Sprachinstitut GmbH, Lindau, Germany</h4>
<p>09.2013 - 01.2014</p>
</div>
</div>
<ul>
<li>CRM</li>
<li>Marketing: competition analysis and prospect survey research</li>
<li>Data exploitation and creation of documents for the ISO 9001 school certification</li>
<li>Various tasks for the school manager</li>
</ul>
<p>
<img src="medias/hsbc_trinkaus_logo.png" alt="HSBC Trinkaus logo" />
</p>
<!-- the logo is too large for any text to stand on its side -->
<h3>Assistant of the Team “Support to insolvency administrators” (Bachelor internship)</h3>
<h4>HSBC Trinkaus & Burkhardt AG (Corporate cients), Düsseldorf, Germany</h4>
<p>05.2012 – 08.2012</p>
<ul>
<li>Insight into equity backing principles, insolvency re-financing and trust accounts administration</li>
<li>Assistance to the team for opening trust accounts and for monitoring steps of insolvency proceedings</li>
<li>Daily queries for new insolvency cases in dedicated data bases</li>
</ul>
</div>
<div class="cmain-element">
<h2>Education</h2>
<h3>Specialization in E-Commerce and online Marketing</h3>
<h4>Conservatoire National des Arts et Métiers, Paris (Online training), France</h4>
<p>10.2014 - 04.2016</p>
<ul>
<li>“Online advertising and communication “(ESC127) - Grade: 1</li>
<li>"E-Commerce “(ESC128) - Grade: 1</li>
<li>“Collection and processing of digital marketing data “(ESC129) - Grade: 1</li>
<li>“Decision-making statistics in marketing “(ESC104) - Grade: 2,2</li>
<li>“Electronic marketing – digital marketing “(ESC123) - Grade: 1</li>
</ul>
<h3>Double degree: Master of Arts “Internationale Wirtschaftsbeziehungen” (International Economic Relations) – Grade 1,9</h3>
<h4>Albert-Ludwigs-Universität Freiburg, Freiburg im Breisgau, Germany</h4>
<p>10. 2012 - 09. 2014</p>
<p><strong>Masterarbeit: “Legislative environment of the bio-food sector”</strong> (Master’s thesis, 2014, 77p.) in German.</p>
<p>The founding texts (Codex Alimentarius and IFOAM Guidelines) and the laws of organic food; their relationships with the most famous bio private labels, internationally and in some regions and countries deeply involved in the organic food sector
(EU, USA, Switzerland, Germany, France, Austria ...).</p>
<h3>Double degree: Master of Arts „Commerce et Affaires internationales“ (International Business) – Grade 1,9</h3>
<h4>Université Paris Est Créteil (U-PEC), Créteil, France</h4>
<p>10.2012 - 09. 2014</p>
<p><strong>Theoretical work for preparing my internship: “Quality and training”</strong> (Sept. 2013, 35 p.) in French.</p>
<p>EFQM (European Foundation for Quality Management) excellence model and quality management with examples relative to training. Management process of a training action, from creation to evaluation and its improvement in the context of a quality
approach.
</p>
<h3>Bachelor of Arts „Commerce et Affaires Internationales“ (International Business) – Grade 1,6</h3>
<h4>Université Paris Est Créteil (U-PEC), Créteil, France</h4>
<p>10.2009 - 08.2012</p>
<p>Diploma with four languages (French, English, German, Italian)</p>
<h3>Baccalauréat</h3>
<h4>Lycée d’Arsonval, Saint Maur des Fossés</h4>
<p>06.2009</p>
<p>Scientific Baccalauréat in engineering sciences</p>
</div>
</section>
<section id="hobbies-passions">
<div id="hobbies-img">
<h2>Hobbies and passions</h2>
<p>
<img src="medias/hobbies_passions_1.png" alt="My hobbies and passions" />
</p>
<p>
<img src="medias/hobbies_passions_2.png" alt="My hobbies and passions" />
</p>
</div>
</section>
<footer>
<div id="footerbox">
<div class="footerelement">
<a href="https://linkedin.com/in/thibaultbetremieux">
<img src="medias/footer/linkedin_logo_40px.png" alt="Thibault Bétrémieux Linkedin">
</a>
</div>
<div class="footerelement">
<a href="https://www.xing.com/profile/Thibault_Betremieux">
<img src="medias/footer/xing_logo_40px.png" alt="Thibault Bétrémieux Xing">
</a>
</div>
<div class="footerelement">
<a href="http://t.btmx.fr/category/tech">
<img src="medias/footer/wp_articles_40px.png" alt="Thibault Bétrémieux Wordpress articles">
</a>
</div>
</div>
</footer>
</div>
</div>
<!--BG1 -->
</div>
<!--BG2 -->
</body>
</html>
Notes:
Perhaps this can help (it's the structure of the website):
i.stack.imgur.com/BEHxr.png
(I can post only 2 links max please copy paste and sorry...)
What I've tried so far:
for the text: redifining all font-sizes with media-queries for screens smaller than 1000px. For some reason, I have to define font-size for subitems (Box-> Item -> Subitems) because changing h2 or p etc. doesn't affect them. I have to use crazy values like 1.7em for them to look alright on mobile. But then if I'm on desktop with a reduced window (at less than 1000px), 1.7em looks huge :( !!
for the images: setting the image as background of the parent's (if I'm not mistaken) box seemed like a promising solution, however when I did that, the image was overflowing the box on the mobile :( ! I've also tried putting width=100% on parent or child but it didn't work.
other things that didn't make any sense or things I can't remember :P
I managed to resolve all problems by using the following code which gives a scale to the page:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Take care :)!
Related
I am working on a flexbox layout with 3 flexbox containers and where one of them has a nested flexbox layout inside of it. The one with the nested flexboxes seems to wrap/break too early, eventhou there is available for space for it to take up. I have tried so many different combinations of flex-grow and flex-shrink on the parent elements that I feel like I'm losing my mind, still I can't shake the feeling that there is a simple solution to this.
It works exactly as I want it when the size of the browser is ~ 1600px but as soon as it resizes to smaller it seems breaks the layout and wraps, even thou there is available space for it to continue maintain it's layout.
I can achieve what I want if I change the flex-grow setting on the parent but then the flexboxes doesn't align anymore, which I want. How do I keep both the alignment and the flexbox-growing?
Correct layout but breaking too early example https://jsfiddle.net/9g5dam6f/
Growing properly but not aligning correctly example https://jsfiddle.net/bctgv7ah/
Here is the code as well for the one that breaks too early, but is correctly aligned:
.content {
width: 100%;
overflow: hidden;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
}
.col-info {
margin: 0 0px 20px;
box-sizing: border-box;
}
.columns {
display: flex;
padding: 1.2em;
flex-wrap: wrap;
box-sizing: border-box;
}
.col-45-info {
width: 40%;
background-color: hotpink;
}
.col-26-info {
width: 26.65%;
justify-content: end;
display: flex;
flex-grow: 0;
flex-shrink: 1;
flex-wrap: wrap;
background-color: purple;
}
.col-33-info {
width: 33.33%;
background-color: pink;
}
.col-50-info {
width: 51%;
display: flex;
flex-wrap: wrap;
gap: 2em;
background-color: grey;
opacity: 50%;
}
h1 {
font-family: Helvetica, sans-serif;
font-size: 21px;
text-align: left;
}
.columns h1 {
margin-bottom: 1rem;
}
.columns p {
font-size: 16px;
font-family: Helvetica, sans-serif;
line-height: 1.3;
}
li {
text-align: left;
font-size: 16px;
font-family: Helvetica, sans-serif;
list-style-type: none;
line-height: 1.17;
}
.columns a {
text-decoration: underline;
font-family: Helvetica, sans-serif;
color: black;
font-size: 16px;
width: 100%;
}
<div class="content">
<div class="columns">
<div class="col-info col-33-info">
<h1> TRAILBLAZER </h1>
<li>Art Direction </li>
<li>Creative Concept</li>
<li> Graphic Design </li>
<li> Web Design </li>
<li> Web Development </li>
<li> Visual Effects </li>
</div>
<div class="col-info col-45-info">
<p> Art direction and campaign for design collaboration between international brands Marimekko, Matty Bovan, Nomen Nescio, palmer//harding, Per Götesson, Zandra Rhodes, final-year fashion students at Beckmans College of Design and Stockholm Fashion
Week. <br> <br> The story of the Trailblazer is the story of the innovator. Inspired by the strong artistic approach of all brand and designers, we created a creative concept inspired by 90’s anime and manga that could fit each collections individuality,
and where each collection could be the hero in their own world, where they blaze a trail for others to walk on. <br> <br> The final develiberables included: A concept film, campaign photos, lookbook photos, website design and development, digital
and some material.
</p>
</div>
<div class="col-info col-26-info">
<div class="col col-50-info">
<li> <a target="_blank" href="https://trailblazer.beckmans.college/"> Visit the web </a> <br>
<a target="_blank" href="https://vimeo.com/510337626"> Watch the film </a> <br>
<a target="_blank" href="https://trailblazer.beckmans.college/"> ELLE Magazine </a> <br>
<a target="_blank" href="https://trailblazer.beckmans.college/"> ArtsThread </a>
</li>
</div>
<div class="col-50-info">
<li class="col" style="margin:0;">
Date
<br> Team </li>
<li class="col"> 2020 <br> Almir Jasarevic <br> Astrid Askert <br> Elisabet Lindén <br> Saba Mehrabanfar <br> Sofia Hjortberg
</li>
</div>
</div>
</div>
</div>
I got it working by using justify: space-between; and setting a fixed width for the sibling elements.
You can see the working example here: https://jsfiddle.net/yrwh062z/2/
I've been trying to get these pictures to become more prominent, but nothing I've done works. I want this:
desired result
but I'm getting this:
what I have
I've tried messing with width and height, and I thought it was the container causing the issue, but I couldn't find anything there.
Could anyone help me figure out why this is happening and how to prevent this in the future?
Here's the code:
#pop-rec {
padding-top: 10rem;
}
.pop-rec-wrapper {
display: flex;
flex-direction: column;
gap: 3rem;
}
.pop-rec-left {
display: flex;
gap: 1rem;
}
.pop-rec-item {
background-color: var(--primary-50);
padding: 1.2rem;
padding-top: 5rem;
border-radius: 12px;
/*width: 45%*/
margin: 0 auto;
}
.pop-rec-item-img {
margin-top: calc(-50% - 2rem);
margin-bottom: 1.0rem;
border-radius: 12px;
width: 100%;
}
.pop-rec-item-img img {
object-fit: cover;
}
.pop-rec-item-title {
font-size: 1.4rem;
color: #360215;
font-weight: 600;
margin-bottom: 1rem;
}
.pop-rec-itme-totaltime {
color: var(--primary-600);
font-size: 1.4rem;
font-weight: 600;
margin-bottom: 1rem;
}
.pop-rec-img1 .pop-rec-img2 {
height: max-content;
width: max-content;
}
<section id="pop-rec">
<div class="container">
<div class="pop-rec-wrapper">
<div class="pop-rec-left">
<div class="pop-rec-item">
<div class="pop-rec-item-img">
<img src="https://via.placeholder.com/200" alt="food img" class="pop-rec-img1" />
<h2 class="pop-rec-item-title">
Southern Style Sweet Tea
</h2>
<h3 class="pop-rec-itme-totaltime">TOTAL TIME: 20 mins</h3>
</div>
<p class="pop-rec-item-desc">
Every gal in the south has her way of making sweet tea. We're pretty proud about it, too. Around my house, we like our tea strong and sweet. So if you ever have trouble getting your tea just right every time, give this recipe a try.
</p>
</div>
<div class="pop-rec-item">
<div class="pop-rec-item-img">
<img src="https://via.placeholder.com/200" alt="food img" class="pop-rec-img2" />
</div>
<h2 class="pop-rec-item-title">
Grandma's Collard Greens
</h2>
<h3 class="pop-rec-itme-totaltime">TOTAL TIME: 3 hours 15 minutes</h3>
<p class="pop-rec-item-desc">
These authentic Southern Collard Greens are braised in savory meat flavored and perfectly spiced pot liquor resulting in a fantastic tender silky texture!!! Serve with this cornbread or corn muffins and hot sauce for an authentic home meal. Are you looking
for the real deal? This is a true Southerner’s dream!
</p>
</div>
</div>
<div class="pop-rec-right">
<h2 class="pop-rec-title">Popular Recipes</h2>
<p class="pop-rec-text">
Our weekly trending recipes.
</p>
Explore more
</div>
</div>
</div>
</section>
A bit hard to debug, but can you try adding this or updating your class.
.pop-rec-item-img img{
object-fit: cover;
display: block;
}
Neat! It looks like the only content that is off is your image, right?
So I would target the image directly by doing either
img { width: 100%; }
Or, be more specific by pairing with your class (recommended so as to not mess with all your website's images)
.pop-rec-item img { width: 100%; }
I would also recommend removing margin-top: calc(-50% - 2rem); which is pushing your image up and out of your pink box
I also suspect that the padding of the parent divs may be what is forcing the image to be so small. On your web browser, you can right click and select inspect to visually see where padding is on your element
This actually solved the problem ( align-items:baseline; )
#pop-rec {
padding-top: 10rem;
}
.pop-rec-wrapper {
display: flex;
flex-direction: column;
gap: 3rem;
}
.pop-rec-left {
display: flex;
gap: 1rem;
align-items:baseline;
}
.pop-rec-item {
background-color: var(--primary-50);
padding: 1.2rem;
padding-top: 5rem;
border-radius: 12px;
/*width: 45%*/
margin: 0 auto;
}
.pop-rec-item-img {
margin-top: calc(-50% - 2rem);
margin-bottom: 1.0rem;
border-radius: 12px;
width: 100%;
}
.pop-rec-item-img img {
object-fit: cover;
}
.pop-rec-item-title {
font-size: 1.4rem;
color: #360215;
font-weight: 600;
margin-bottom: 1rem;
}
.pop-rec-itme-totaltime {
color: var(--primary-600);
font-size: 1.4rem;
font-weight: 600;
margin-bottom: 1rem;
}
.pop-rec-img1 .pop-rec-img2 {
height: max-content;
width: max-content;
}
<section id="pop-rec">
<div class="container">
<div class="pop-rec-wrapper">
<div class="pop-rec-left">
<div class="pop-rec-item">
<div class="pop-rec-item-img">
<img src="https://via.placeholder.com/200" alt="food img" class="pop-rec-img1" />
<h2 class="pop-rec-item-title">
Southern Style Sweet Tea
</h2>
<h3 class="pop-rec-itme-totaltime">TOTAL TIME: 20 mins</h3>
</div>
<p class="pop-rec-item-desc">
Every gal in the south has her way of making sweet tea. We're pretty proud about it, too. Around my house, we like our tea strong and sweet. So if you ever have trouble getting your tea just right every time, give this recipe a try.
</p>
</div>
<div class="pop-rec-item">
<div class="pop-rec-item-img">
<img src="https://via.placeholder.com/200" alt="food img" class="pop-rec-img2" />
</div>
<h2 class="pop-rec-item-title">
Grandma's Collard Greens
</h2>
<h3 class="pop-rec-itme-totaltime">TOTAL TIME: 3 hours 15 minutes</h3>
<p class="pop-rec-item-desc">
These authentic Southern Collard Greens are braised in savory meat flavored and perfectly spiced pot liquor resulting in a fantastic tender silky texture!!! Serve with this cornbread or corn muffins and hot sauce for an authentic home meal. Are you looking
for the real deal? This is a true Southerner’s dream!
</p>
</div>
</div>
<div class="pop-rec-right">
<h2 class="pop-rec-title">Popular Recipes</h2>
<p class="pop-rec-text">
Our weekly trending recipes.
</p>
Explore more
</div>
</div>
</div>
</section>
I have attached my HTML along with my CSS code and a picture of the webpage. I can not figure out why there is a gap in the red background color at the bottom. Any help is much appreciated
/*
Landon Byrd
Fall 2021
Plain Red #f60d41
Rich Red #f6130d
Orioles Orange #f64d0d
Sunset Orange #f6870d
Golden Yellow #f6c10d
*/
/* Global settings */
h1 {
text-align: center;
font-family: Papyrus
}
h2 {
text-align: center;
color: #f6130d;
text-decoration: underline
}
.wrapper {
width: 85%;
margin: 0 auto;
max-width: 960px;
}
/* Nav Section */
.nav {
width: 85%;
margin: 0 auto;
background-color: #f6130d;
text-align: center;
}
.menu {
float: left;
width: 25%
}
/* Main section */
.banner {
justify-content: center;
background-color: #f6c10d;
text-align: center;
}
.bulletPoints {
text-align: center;
}
section {
background-color: #f6870d;
color: #f60d41;
font-style: italic;
margin: 25px 50px 75px;
}
body {
background-image: url("images/background.jpeg");
}
.image1 {
display: block;
margin-left: auto;
margin-right: auto;
}
figcaption {
text-align: center;
}
.row {
display: flex;
}
.column {
flex: 33.33%;
padding: 5px;
}
/* Footer section */
* {
box-sizing: border-box;
}
.footer {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
.box {
float: left;
width: 33.33%
}
.footer::after {
content: "";
clear: both;
display: table;
}
/* Copyright section */
.copyright {
text-align: center;
background-color: #f6130d;
color: #f6c10d;
}
<!DOCTYPE html>
<head>
<title>Augie's Custom T-shirts</title>
<meta charset="utf-8">
<link href="Style.css" rel="stylesheet">
</head>
<body>
<nav class="nav">
<div class="menu">
<p>Home</p>
</div>
<div class="menu">
<p>Shop</p>
</div>
<div class="menu">
<p>Events</p>
</div>
<div class="menu">
<p>Contact Us</p>
</div>
<br/>
<br/>
</nav>
<main class="wrapper">
<div class="banner">
<h1><span class="name">Augie's Custom T-shirts</span></h1>
<h2>Custom T-shirts for you or your party.</h2>
<div class="bulletPoints">
<ul>
<li>Birthday parties</li>
<li>Vacation groups</li>
<li>Bachelorette Parties</li>
<li>Family reunions</li>
<li>Work team rewards</li>
<li>Business promotions</li>
</ul>
</div>
<br/>
</div>
<p id="Catch">
Do you have an event coming up, and want everyone to get in the spirit? T-shirts can bring a group together, make everyone feel connected, and let everyone know what you're celebrating.
</p>
<p>T-shirts can also be a great gift to someone that acknowledges their special interest or hobby.</p>
<p>Choose from one of our unique designs, or let us put your own design on a shirt for you.</p>
<div class="row">
<div class="column">
<img src="images/gorilla.jpg" alt="Gorilla" style="width:100%">
</div>
<div class="column">
<img src="images/pink.jpg" alt="Pink" style="width:100%">
</div>
<div class="column">
<img src="images/skull.jpg" alt="Skull" style="width:100%">
</div>
</div>
<p><strong>How it works:</strong></p>
<p>Browse our selection of unique designs, select the size and colors of the shirts you would like, and place your order. We will ship your shirts within three business days for in-stock shirts, or five days for custom size and colors.</p>
<figure>
<img src="images/t-shirt-colors.jpeg" alt="T-shirt colors" class="image1">
<figcaption>Choose from are variety of t-shirt colors!</figcaption>
</figure>
<p>Have a design of your own? Can't find the right sentiment? Call or email us to discuss the possibilities or get some ideas for your event.</p>
<p>Please note there will be a one time $15 charge for any custom graphics design.</p>
<h2><em>Contact us today!</em></h2>
</main>
<footer class="footer">
<div class="box">
<p>Augie's Custom T-shirts</p>
<p>(478) 555-1212</p>
<p>augieB#augiesTees.com</p>
<br/>
</div>
<div class="box">
<p>Check out are Social Media for updates!</p>
<p>Facebook:</p>
<p>Instagram:</p>
<p>Twitter:</p>
</div>
<div class="box">
<p>Locations:</p>
<br/>
<p>100 Tanger Dr, Locust Grove, GA</p>
<p>2954 Watson Blvd Suite 100, Warner Robins, GA</p>
</div>
</footer>
<div class="copyright">
<h3> #copyright: Landon Byrd</h3>
<p>Fall 2021, All Rights Reserved</p>
</div>
<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />
</a>
</p>
</div>
</body>
Side note my verified CSS checker image is also not showing up at the very bottom of the page and the HTML checker is giving me the following error
Error: Stray end tag div.
From line 123, column 1; to line 123, column 6
just add h3{ margin-top: 0px; } to your css code to remove the white line between the red divs at the bottom of the side
add the div with 'class=copyright' inside the footer and remove the extra </div> at last
that h3 tag in your .copyright div taking the default
margin-block-start: 1em;
margin-block-end: 1em;
you can use
.copyright h3{
margin-block:0;
}
this will remove the white space..
or you can use
*{
margin:0;
padding:0;
}
this will remove the default margin and padding from the page
I've been trying to figure out the issue for hours. I've tried to use .about_container {justify-content: space-evenly;} However, it doesn't add any spacing between the child items. Also, the items do not adjust size. I've tried adding flex-flow, flex-basis, and flex-shrink/grow but none of them make any difference. I'm also having issues getting the images to be a specific size while also being responsive.
I would appreciate any advice!
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
max-width: 1300px;
width: 100%;
}
body {
margin: 0 auto;
max-width: 80%;
height: 100%;
background-attachment: fixed;
background-image: url(2019-12-11-mountain-day-featured-01.jpg);
background-size: cover;
}
h1 {
font-size: 3em;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
text-align: center;
margin-bottom: 10%;
}
.about_container {
display: flex;
color: #A3DAE3;
background-color: #784C87;
box-shadow: -10px -10px 15px #A3DAE3 inset;
border-radius: 25px;
margin-bottom: 10%;
}
#about_jason {
margin-left: 20px;
}
#about_sam {
margin-right: 20px;
}
#about_mike {
margin-left: 20px;
margin-right: 20px;
}
.about_container img {
height: 300px;
width: 300px;
object-fit: scale-down;
}
article {
margin-top: 10px;
}
#about_mike a {
text-decoration: none;
color: #450175;
}
#about_mike a:hover {
color: #89A1C9;
}
footer {
text-align: center;
padding-top: 5%;
}
#links li {
transition: all .2s ease-in-out;
}
#links li:hover {
transform: scale(1.5);
}
#media only screen and (max-width: 768px) {
html {
width: 100%;
}
.about_container {
display: flex;
flex-direction: column;
justify-content: space-around;
}
article {
padding-bottom: 20px;
padding-top: 20px;
}
.about_jason > h2 {
padding-top: 30px;
}
#about_mike a {
text-decoration: none;
color: #450175;
}
#about_mike a:hover {
color: #784C87;
}
}
<body>
<div class="menu-wrap">
<input type="checkbox" class="toggler">
<div class="hamburger"><div></div></div>
<div class="menu">
<div>
<div>
<ul id="links">
<li>Home</li>
<li>About Us</li>
<li>How-to</li>
<li>Portfolio</li>
<li>Services</li>
<li>Contact Us</li>
</ul>
</div>
</div>
</div>
</div>
<div class="sharethis-inline-follow-buttons"></div>
<h1>About Us</h1>
<div class="about_container">
<div id="about_jason">
<h2>Jason R.</h2>
<img src="90528548_10213477312766132_4964276883236585472_n.jpg" />
<p>Hey guys! My name is Jason. I graduated with my Associates of
Applied Science degree in Computer Programming at Minnesota State
Community and Technical college. I am now a Computer Science major
at Davenport University. I work on both the front-end and back-end
within our small team. Outside of work, I enjoy playing video games,
biking, hiking, programming and learning about anything and everything!
I look forward to working with you!</p>
</div>
<div id="about_mike">
<h2>Michael J.</h2>
<img src="Mike.jpg"/>
<p>Hey there! My name is Mike. I live in Montrose,
Colorado where I remotely work with Jason and Sam.
I am a self-taught graphic designer/illustrator.
For several years, I have developed a strong graphic
design portfolio and have a collection of my journey
over the years on my own personal Wordpress at
my wordpress.
I am advanced in Adobe InDesign, Illustrator, and
Photoshop. Outside of work, I enjoy working on digital
art, reading, photography, and teaching myself how to program.
I am currently learning web development and python. I look
forward to working with my team and I look forward to working
with our clients we work with.</p>
</div>
<div id="about_sam">
<h2>Samantha K.</h2>
<img src="cropped_profile_picture.jpg"/>
<p>Hi everyone! My name is Samantha K. I started as a self
taught designer and am now making the big move to pursue
a degree in web design. I have experience in affinity designer,
html and css. I have a beautiful 2 year old daughter, Emily, and
a one year old puppy, Tobi. I live in Clifton, Colorado with my
fiance, my daughter, our best friend and our dog. I enjoy bike rides,
swimming, movies, photography, writing and creating digital art.
I look forward to learning, gaining experience and working with my
team to create beautiful designs.</p>
</div>
</div>
</body>
the problem is here. you have given the images the width and height values to remain the same in all sizes.
.about_container img {
height: 300px;
width: 300px;
object-fit: scale-down;
}
I created a single class for each person div (about). and I gave each picture the width property as 350 px. instead of giving a fixed width height value to the images, I added the properties display block, width 100%. So they will always adjust themselves according to it, no matter how much the container width is.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
margin: 0 auto;
max-width: 80%;
height: 100%;
background-attachment: fixed;
background-image: url(2019-12-11-mountain-day-featured-01.jpg);
background-size: cover;
}
h1 {
font-size: 3em;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
text-align: center;
margin-bottom: 10%;
}
.about_container {
display: flex;
color: #A3DAE3;
background-color: #784C87;
box-shadow: -10px -10px 15px #A3DAE3 inset;
border-radius: 25px;
margin-bottom: 10%;
justify-content: space-evenly;
}
.about {
width: 350px;
}
#about_jason {
margin-left: 20px;
}
#about_sam {
margin-right: 20px;
}
#about_mike {
margin-left: 20px;
margin-right: 20px;
}
.about_container img {
display: block;
width: 100%;
object-fit: scale-down;
}
article {
margin-top: 10px;
}
#about_mike a {
text-decoration: none;
color: #450175;
}
#about_mike a:hover {
color: #89A1C9;
}
footer {
text-align: center;
padding-top: 5%;
}
#links li {
transition: all .2s ease-in-out;
}
#links li:hover {
transform: scale(1.5);
}
#media only screen and (max-width: 768px) {
html {
width: 100%;
}
.about_container {
display: flex;
flex-direction: column;
justify-content: space-around;
}
article {
padding-bottom: 20px;
padding-top: 20px;
}
.about_jason>h2 {
padding-top: 30px;
}
#about_mike a {
text-decoration: none;
color: #450175;
}
#about_mike a:hover {
color: #784C87;
}
}
<body>
<div class="menu-wrap">
<input type="checkbox" class="toggler">
<div class="hamburger">
<div></div>
</div>
<div class="menu">
<div>
<div>
<ul id="links">
<li>Home</li>
<li>About Us</li>
<li>How-to</li>
<li>Portfolio</li>
<li>Services</li>
<li>Contact Us</li>
</ul>
</div>
</div>
</div>
</div>
<div class="sharethis-inline-follow-buttons"></div>
<h1>About Us</h1>
<div class="about_container">
<div id="about_jason" class="about">
<h2>Jason R.</h2>
<img src="https://i.pinimg.com/originals/72/1d/13/721d13848e02189b9c7aed0d27ae433a.jpg" />
<p>Hey guys! My name is Jason. I graduated with my Associates of Applied Science degree in Computer Programming at Minnesota State Community and Technical college. I am now a Computer Science major at Davenport University. I work on both the front-end
and back-end within our small team. Outside of work, I enjoy playing video games, biking, hiking, programming and learning about anything and everything! I look forward to working with you!</p>
</div>
<div id="about_mike" class="about" >
<h2>Michael J.</h2>
<img src="https://i.pinimg.com/originals/72/1d/13/721d13848e02189b9c7aed0d27ae433a.jpg" />
<p>Hey there! My name is Mike. I live in Montrose, Colorado where I remotely work with Jason and Sam. I am a self-taught graphic designer/illustrator. For several years, I have developed a strong graphic design portfolio and have a collection of my
journey over the years on my own personal Wordpress at
my wordpress. I am advanced in Adobe InDesign, Illustrator, and Photoshop. Outside of work, I enjoy working on digital art, reading, photography, and teaching myself how to program. I am currently
learning web development and python. I look forward to working with my team and I look forward to working with our clients we work with.</p>
</div>
<div id="about_sam" class="about">
<h2>Samantha K.</h2>
<img src="https://i.pinimg.com/originals/72/1d/13/721d13848e02189b9c7aed0d27ae433a.jpg" />
<p>Hi everyone! My name is Samantha K. I started as a self taught designer and am now making the big move to pursue a degree in web design. I have experience in affinity designer, html and css. I have a beautiful 2 year old daughter, Emily, and a one
year old puppy, Tobi. I live in Clifton, Colorado with my fiance, my daughter, our best friend and our dog. I enjoy bike rides, swimming, movies, photography, writing and creating digital art. I look forward to learning, gaining experience and
working with my team to create beautiful designs.</p>
</div>
</div>
Please help me. I need 3 li element like in image those I downloaded (icon+text), but they have wrong behavior.
I need like this
.icon-equipment {
background-image: url('http://infocem.info/wp-content/uploads/2017/05/1.png');
background-position: left center;
background-repeat: no-repeat;
padding-left: 20px; /* Adjust according to image size to push text across. */
}
ul {
list-style: none;
}
.advantages {
display: flex;
flex-flow: row wrap;
border: 1px solid purple;
height: 123px;
margin: 0;
padding: 0;
}
.advantages > * {
margin-left: 92px;
}
<ul class="advantages">
<li class="icon-equipment">Поставка оборудования<br> и запчастей<br><span>От 11 ведущих производителей</span><li>
<li class="icon-payment">Рассрочка платежа<br><span>До 45 дней с оформления заказа</span></li>
<li class="icon-delivery">Доставка товаров<br><span>Международная и междугородняя<br>в срок до 10 дней</span></li>
</ul>
The main thing to understand here is how to set-up a good hierarchy, so that you may have control over it. What I mean is, you have to separate your item into sections, which can be arranged easily using your model of choice (flexbox in this case).
Just take a look at the html that I have provided, see how it is structured. You have a container, within that container you have two elements, a left-side element (icon) and a right-side element (texts).
Styles are also a thing to notice, you will need some prefixing as well.
Since this is your first time on stackoverflow, I will give you this code ready for use. Usually you have to provide some code that you have been working on, and then seek assisstance for it. Whatever you do, please DO NOT expect this for future problems that you post here on Stack. Read the rules, follow the rules.
html {
font-family: 'Helvetica Neue', Arial, sans-serif;
}
.icon-equipment {
background-image: url('http://infocem.info/wp-content/uploads/2017/05/1.png');
background-position: left center;
background-repeat: no-repeat;
/* Adjust according to image size to push text across. */
}
ul {
list-style: none;
}
.advantages {
display: flex;
flex-flow: row wrap;
margin: 0;
padding: 0;
}
.advantages .advantages-item {
display: flex;
align-items: flex-start;
background: #000;
color: #fff;
padding: 1rem;
max-width: 300px;
margin-right: 1rem;
margin-bottom: 1rem;
}
.advantages .advantages-item:last-of-type {
margin-right: 0;
}
.advantages .advantages-item .item-right {
display: flex;
flex-direction: column;
padding-left: 1rem;
}
.advantages .advantages-item .item-right .right-text {
font-weight: bold;
text-transform: uppercase;
margin: 0;
margin-bottom: 1rem;
}
<ul class="advantages">
<li class="advantages-item">
<div class="item-left">
<div class="top-icon">
<img src="http://infocem.info/wp-content/uploads/2017/05/1.png" alt="" class="icon">
</div>
</div>
<div class="item-right">
<p class="right-text">Поставка оборудования и запчастей</p>
<span>От 11 ведущих производителей</span>
</div>
<li>
<li class="advantages-item">
<div class="item-left">
<div class="top-icon">
<img src="http://infocem.info/wp-content/uploads/2017/05/1.png" alt="" class="icon">
</div>
</div>
<div class="item-right">
<p class="right-text">Поставка оборудования и запчастей</p>
<span>От 11 ведущих производителей</span>
</div>
<li>
<li class="advantages-item">
<div class="item-left">
<div class="top-icon">
<img src="http://infocem.info/wp-content/uploads/2017/05/1.png" alt="" class="icon">
</div>
</div>
<div class="item-right">
<p class="right-text">Поставка оборудования и запчастей</p>
<span>От 11 ведущих производителей</span>
</div>
<li>
</ul>