I've been trying a few different things to remove the second page on this page when printing. Is there something I am doing wrong?
I've placed:
page-break-after: avoid;
page-break-inside: avoid;
On to the last element on the page, so I'm just a little confused on what I'm doing wrong here.
Any suggestions would be appericated.
See the code below...
/* Custom Hero Styles */
.subhero1 {
background: #000;
height: 400px !important;
}
#media only screen and (min-width: 0px) and (max-width: 650px) {
.subhero1 {
background: #000;
height: 250px !important;
}
.subhero__content-container {
color: #fff !important;
}
}
/* Custom Cards */
.obs__fullcardheader {
border-bottom: 0px;
margin-bottom: 0px;
padding-bottom: 0px;
font-size: 3.5vmax;
}
.obs__fullcard {
height: 400px;
width: 100%;
border: 5px solid #eee;
}
.obs__cardheader img {
max-width: 20%;
}
.obs__card {
height: 300px;
}
.fullcardwrapper {
background: #f6f6f6;
background-size: cover;
background-position: center;
padding-top: 30px;
line-height: 30px;
}
.cardwrapper {
padding: 30px;
}
.appicons img {
max-width: 160px;
}
.small__font {
font-size: 12px;
}
.obs__cardline2 {
font-size: 14px;
}
.obs__cardline1 a {
color: #000;
text-decoration: none;
cursor: pointer;
}
.obs__cardline1 a:hover {
color: #565656;
border-bottom: 1px solid #565656;
}
.obs__cardline2 a {
color: #000;
text-decoration: none;
cursor: pointer;
}
.obs__cardline2 a:hover {
color: #565656;
border-bottom: 1px solid #565656;
}
.coupon-btn-wrapper {
margin: 0 auto;
max-width: 300px;
}
.print-exclusions {
display: none;
}
#media (max-width: 650px) {
.obs__card {
width: 100%;
}
.obs__cardheader img {
max-width: 15% !important;
}
.obs__fullcardheader {
font-size: 4.5vmax;
}
.obs__couponhero-line1 {
padding-top: 20px;
}
}
#media (max-width: 1050px) {
.obs__card {
width: 100%;
height: 250px;
}
.obs__cardheader img {
max-width: 10%;
}
.cardwrapper {
padding: 0px;
margin-top: 0px;
}
.fullcardwrapper {
padding-top: 10px;
background: #fff;
}
.obs__fullcard {
border: 1px solid #eee;
}
.obs__fullcardheader {
font-size: 4.5vmax;
}
.coupon-btn-wrapper {
max-width: 280px;
}
}
.obs__couponhero-line1 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
line-height: 18px;
padding-top: 30px;
}
.obs__couponhero-line2 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
}
.obs__couponhero-barcode {
margin: 0 auto;
}
.obs__couponhero-line3 {
font-size: 14px;
color: #000;
margin-bottom: 10px;
margin-top: -30px;
}
.couponlinks a {
color: #fff;
background: #000;
text-decoration: none;
font-size: 14px;
padding: 15px;
}
#media print {
#page {
size: landscape
}
.obs__card {
width: 33%;
height: 250px;
}
.head-main,
.obs__cardline2,
.appicons,
.cust_service_headline,
.obs__accordion,
.coupon-btn-wrapper {
display: none;
}
.obs__fullcard {
height: 260px;
}
.cardwrapper {
margin-top: 10px;
max-width: 97.8%;
}
.obs__cardheader img {
max-width: 25%;
}
footer {
display: none;
}
.print-exclusions {
display: block;
padding-left: 14px;
margin-top: -115px;
margin-bottom: 0;
page-break-after: avoid;
page-break-inside: avoid;
}
.obs__fullcard {
width: 110%;
}
.obs-3 {
clear: none;
}
#page {
margin: 0;
}
body {
margin: 1.6cm;
}
}
<link href="https://media.offbroadwayshoes.com/css/obframe.css" rel="stylesheet"/>
<div class="frame fullcardwrapper">
<div class="obs__max1200">
<div class="obs__cards">
<div class="obs__fullcard">
<div class="obs__cardinner">
<div class="obs__fullcardheader">##offer##</div>
<div class="obs__couponhero-line1"><span class="new-line-mob">PLUS, BUY ONE, GET ONE</span> <span class="new-line-mob">50% OFF* YOUR 2ND PAIR</span>
<br /> *EXCLUSIONS APPLY</div>
<div class="obs__couponhero-line2">##tatic## · VALID THRU ##valid##</div>
<div class="obs__couponhero-barcode"> </div>
<div class="obs__couponhero-line3">##ifonline## <font style="font-weight:bold;">##onlinecode##</font></div>
<div class="obs__cardline3">
<div class="coupon-btn-wrapper">
<div class="obs-2-static couponlinks" style="text-align: center;">FIND YOUR STORE</div>
<div class="obs-2-static couponlinks" style="text-align: center;">PRINT COUPON</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="frame cardwrapper bg-split__greytowhite">
<div class="obs__max1440">
<div class="obs__cards">
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="https://media.offbroadwayshoes.com/icons/bogo.svg" alt="" />
<br /> BOGO 50% OFF*</div>
<div class="obs__cardline1">Buy One, Get One 50%
<br /> Off Your 2ND Pair</div>
<div class="obs__cardline2"><a data-exctarget="#1">SEE DETAILS</a></div>
</div>
</div>
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="https://media.offbroadwayshoes.com/icons/free-shipping.svg" alt="" />
<br /> FREE SHIPPING</div>
<div class="obs__cardline1">Get Free Shipping
<br /> on Orders $50 or More!</div>
<div class="obs__cardline2"><a data-exctarget="#2">SEE DETAILS</a></div>
</div>
</div>
<div class="obs__card">
<div class="obs__cardinner">
<div class="obs__cardheader"><img src="//media.offbroadwayshoes.com/icons/mobile-app.svg" alt="" />
<br /> DOWNLOAD THE APP</div>
<div class="obs__cardline1">Shopping at your finger tips! <a>Learn More</a>
<br />
<br />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="frame">
<div class="obs__max1440">
<div class="obs__spacer50 obs__mob-spacer20"> </div> <span class="cust_service_headline rightsideheading">Details & Exclusions</span>
<div class="obs__spacer10"> </div>
<div class="obs__accordion js-obs__accordion">
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header">Coupon Exclusions</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">*Limit one coupon per transaction. COUPON MAY ONLY BE USED ONCE AND MAY NOT BE MODIFIED, COPIED OR UPLOADED. Excludes Flash Sales, special promotional events. Must present coupon at time of purchase, cannot be combined with other coupons or used for the purchase of Gift Card(s) and is not redeemable for cash. Offer excluded on certain styles and brands, including but not limited to: Adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Koolaburra by Ugg, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles. Discount is taken before taxes. CAN BE COMBINED WITH EARNED QUALIFYING REWARDS DOLLARS BUT NOT OTHER REWARDS COUPON OFFERS. See store associate for details.</div>
</div>
</div>
<!-- end of obs__accordion item -->
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header" id="1">BOGO 50% OFF 2ND PAIR</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">*2nd pair must be of equal or lesser value. Excludes BOGO Free styles, Flash Sales, special promotional events, accessories and certain other styles, including but not limited to adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Koolaburra by Ugg, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles.</div>
</div>
</div>
<!-- end of obs__accordion item -->
<div class="obs__accordion__item js-obs__accordion-item">
<div class="obs__accordion-header js-obs__accordion-header" id="2">Free Shipping</div>
<div class="obs__accordion-body js-obs__accordion-body">
<div class="obs__accordion-body__contents">Free economy shipping offer valid on orders with a subtotal over $50 after all discounts are applied. (Subtotal does not include tax or shipping fees)</div>
</div>
</div>
<!-- end of obs__accordion item -->
</div>
<!-- end of obs__accordion item -->
<!-- end of obs__accordion -->
</div>
</div>
<div class="obs__spacer50 obs__mob-spacer20"> </div>
<div class="print-exclusions">
<div class="obs-3">
<p class="obs__bold">COUPON EXCLUSIONS
<p>
<p style="font-size:8px;">*Limit one coupon per transaction. COUPON MAY ONLY BE USED ONCE AND MAY NOT BE MODIFIED, COPIED OR UPLOADED. Excludes Flash Sales, special promotional events. Must present coupon at time of purchase, cannot be combined with other coupons or used for the purchase of Gift Card(s) and is not redeemable for cash. Offer excluded on certain styles and brands, including but not limited to: Adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Koolaburra by Ugg, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles. Discount is taken before taxes. CAN BE COMBINED WITH EARNED QUALIFYING REWARDS DOLLARS BUT NOT OTHER REWARDS COUPON OFFERS. See store associate for details.</p>
</div>
<div class="obs-3">
<p class="obs__bold">BOGO 50% OFF 2ND PAIR
<p>
<p style="font-size:8px;">*2nd pair must be of equal or lesser value. Excludes BOGO Free styles, Flash Sales, special promotional events, accessories and certain other styles, including but not limited to adidas, Asics, Bear Paw, Birkenstock, Converse, Keds, Koolaburra by Ugg, Merrell, Puma, Rainbow, Reebok, Rockport, Saucony, Sperry, Teva, Tommy Hilfiger Kids’, online Timberland & Timberland Pro, plus all Nike styles.</p>
</div>
<div class="obs-3">
<p class="obs__bold">FREE SHIPPING
<p>
<p style="font-size:8px;">Free economy shipping offer valid on orders with a subtotal over $50 after all discounts are applied. (Subtotal does not include tax or shipping fees)</p>
</div>
</div>
Related
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 have created a static website using html and css, the problem is that when I shrink the browser the text inside of the footer goes outside of the footer, how can I make so that the text always stays in the footer regardless of whether I shrink the browser or not?
* {
margin: 0px;
padding: 0px;
}
.nav-h1 {
text-align: center;
margin-top: 27px;
font-family: 'Open Sans';
font-size: 40px;
}
.nav {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 50%;
}
a {
display: inline-block;
margin: 10px;
font-family: 'Open Sans';
color: black;
font-weight: bold;
}
.a-container {
margin-left: 10%;
margin-top: 27px;
}
.logo-section {
margin-left: 15px;
margin-top: 15px;
}
.main {
min-height: calc(100vh - 70px);
background-color:#F1F1F1;
overflow: hidden;
}
.footer {
width: 100%;
height: 100%;
background-color: black;
color: gray;
font-family: 'Open Sans';
font-size: 15px;
}
.first-box {
width: 45%;
margin: 0 auto;
margin-top: 50px;
}
.first-box-text {
margin-top: 20px;
font-family: 'Open Sans';
}
.centered-p {
text-align: center;
margin-top: 20px;
font-family: 'Open Sans';
}
.second-word {
color: #ffa200;
text-decoration: underline;
}
.centered-img{
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 30px;
}
.header {
height: 8%;
}
.logo-img {
margin-top: 10px;
height: 50px;
}
.flex-container {
display: flex;
margin-top: 50px;
margin-left: 17%;
}
section {
flex: 2;
}
aside {
flex: 1;
}
.bordered-div {
margin-top: 50px;
text-align: center;
padding: 15px;
font-family: 'Open Sans';
font-size: 25px;
border-top: solid 2px gray;
border-bottom: solid 2px gray;
}
.flex-container-first-section-a {
color: #ffa200;
text-decoration: none;
border-bottom: 2px solid #ffa200;
}
.aside-first-section {
width: 60%;
text-align: center;
padding: 15px;
margin-left: 50px;
border-top: solid 2px gray;
border-bottom: solid 2px gray;
}
.aside-img {
margin-left: 50px;
margin-top: 20px;
}
.third-section {
margin-top: 25px;
font-family: 'Open Sans';
}
.forth-section-h1{
margin-left: 28%;
margin-top: 50px;
font-family: 'Open Sans';
}
.forth-section-p {
margin-left: 90px;
margin-top: 40px;
font-family: 'Open Sans';
}
.bordered-div-h1-upper-case {
text-transform: uppercase;
}
.image-container {
display: flex;
margin-top: 30px;
}
.image-container-img {
padding: 5px;
}
.img-with-text {
margin: 10px;
font-family: 'Open Sans';
}
.img-with-text-span {
border-top: solid 3px #ffa200
}
.second-section {
margin-top: 10px;
font-family: 'Open Sans';
}
.bottom-message {
height: 300px;
width: 100%;
margin-top: 50px;
margin-bottom: 50px;
text-align: center;
border: solid 2px black;
}
.bottom-message-button {
width: 50%;
height: 15%;
margin-top: 50px;
background-color: #ffa200;
border-radius: 4px;
border: none;
color: white;
font-family: 'Open Sans';
font-size: 20px;
font-weight: bold;
}
.bottom-message-content {
margin-top: 60px;
margin: 70px;
}
.centered-heading {
font-family: 'Open Sans';
}
.flex-container-first-p {
font-family: 'Open Sans';
}
.bottom-message-h1, .bottom-message-content-p {
font-family: 'Open Sans';
margin-top: 20px;
}
.footer-section {
width: 50%;
margin: 0 auto;
}
.footer-content {
margin: 0px;
padding: 0px;
}
.footer-links-a {
color: gray;
text-decoration: none;
border-right: 1px solid;
padding-right: 23px;
}
.capital-words {
text-transform: uppercase;
padding-top: 10px;
}
.footer-links {
width: 800px;
margin: 0 auto;
margin-top: 50px;
}
.copyright-p {
padding-top: 10px;
}
.aside-h2 {
font-size: 15px;
text-align: center;
margin-top: 10px;
}
.aside-third-section > img {
height: 250px;
}
.line {
border-bottom: solid 2px black;
width: 70%;
margin: 0 auto;
padding-top: 50px;
}
.box-message {
height: 200px;
width: 280px;
margin-top: 50px;
margin-left: 80px;
border: solid 2px black;
}
.box-message-p {
font-family: 'Open Sans';
margin-top: 50px;
width: 60%;
margin: 0 auto;
margin-top: 35px;
font-size: 15px;
}
.box-message-button, .box-message-a {
margin-top: 30px;
margin-left: 70px;
}
.box-message-a {
color: #ffa200;
text-decoration: none;
border-bottom: solid 2px #ffa200;
font-size: 25px;
}
.trending-news-div {
width: 60%;
text-align: center;
padding: 15px;
margin-left: 70px;
margin-top: 50px;
border-top: solid 2px gray;
border-bottom: solid 2px gray;
}
<div class="container">
<div class="header">
<div class="nav">
<h1 class="nav-h1">Nip & Tuck</h1>
<div class="a-container">
<a>Lifestyle</a>
<a>Culture</a>
<a>Sports</a>
<a>Politics</a>
</div>
<div class="logo-section">
<img class="logo-img" src="/assets/images/twitter-logo.PNG" alt="twitter logo">
<img class="logo-img"src="/assets/images/youtube-logo.png" alt="youtube logo">
<img class="logo-img"src="/assets/images/facebook-logo.png" alt="facebook logo">
</div>
</div>
</div>
<div class="main">
<div class="first-box">
<h1 class="centered-heading">How one woman gave her boss, her ex-boyfriend and all her doubters, the big middle finger</h1>
<p class="first-box-text">Janice Allbright decided enough was enough. It was time to change her life. After six months of stock trading, the final result was renewed confidence, increased happiness and £128,405!
</p>
<p class="centered-p">By
<a class="second-word">Kelly Chang</a>
| 30.06.2020</p>
<img src="/assets/images/center-image.png" alt="woman carrying a bag" class="centered-img">
<p class="centered-p">"It's not arrogance, it's confidence"</p>
</div>
<div class="flex-container">
<section>
<p class="flex-container-first-p">
“My life was basically sh!t, says Janice Allbright, a single woman whose life was literally in the toilet six months ago. “I was working at a shop on the high street, earning next to nothing. Then I would go home to my abusive boyfriend. Not exactly a fairytale life.” Everything changed for Janice when she discovered online trading while killing time on her lunch break. “My colleagues, friends and boyfriend at the time all doubted me. Now I’m the queen bitch, laughing at their tears.”
</p>
<div class="bordered-div">
<p>Change your life with the Online Investing System</p>
<a class="flex-container-first-section-a" href="">Get started for free</a>
</div>
<img src="/assets/images/second-center-image.PNG" alt="woman talking on the phone" class="centered-img">
<p class="centered-p">A new and better life</p>
<section class="second-section">
<p>Janice credits her amazing financial success to trading stocks online. The highschool dropout had concerns at the beginning, due to her lack of financial knowledge and experience. “It turned out there was nothing to worry about,” she says. “My broker provided me with all of the training and tools I needed to become a successful stock trader. Their patience was amazing.” </p>
</section>
<section class="third-section">
<p>Brokers and platforms, like the Online Investing System, have turned novice investors into financial superheroes. People like Janice have taken advantage of some tough competition amongst brokers to get the best services for lower prices. Sometimes even for free. “I didn’t have any money for fancy financial tools or software. But lucky me, my broker gave me everything for free.”</p>
</section>
<section class="forth-section">
<img src="/assets/images/third-center-image.PNG" alt="" class="centered-img">
<h1 class="forth-section-h1">"Now I do whatever the f#ack I want when I f#cking want"</h1>
<p class="forth-section-p">Janice believes that her success has given her the confidence to deal with anything life throws her way. And she openly admits that displaying her wealth has become a guilty pleasure. “I was driving in my G Wagon a few weeks ago and noticed my ex-boyfriend waiting at the bus stop. I could resist. I stopped my car, rolled down the window and happily presented my middle finger. I drove away with a smile. Life is good.”</p>
</section>
<div class="bordered-div">
<p>Learn more about online stock trading and how you can profit </p>
<a class="flex-container-first-section-a" href="">Start Now</a>
</div>
<div class="bordered-div">
<h1 class="bordered-div-h1-upper-case">Celebrity News </h1>
</div>
<div class="image-container">
<div class="img-with-text">
<img src="/assets/images/hollywood-image.PNG" alt="hollywod sign" class="image-container-img">
<div class="img-with-text-bottom">
<h4 class="img-with-text-h4">Ass-tastic! We rank the best bums in Hollywood.</h4>
<span class="img-with-text-span">By Lili Johnson 30.06.2020</span>
</div>
</div>
<div class="img-with-text">
<div class="img-with-text-bottom">
<img src="/assets/images/laptop-image.PNG" alt="a picture of a laptop" class="image-container-img">
<h4 class="img-with-text-h4">Coming soon to Netflix. See which movies have us hot and bothered.</h4>
<span class="img-with-text-span">By Gavin Lewis 30.06.2020</span>
</div>
</div>
<div class="img-with-text">
<img src="/assets/images/couple-fighting-image.PNG" alt="a picture of a couple fighting" class="image-container-img">
<h4 class="img-with-text-h4">Another celebrity couple calls it quits. Why can't the rich and famous stay together?</h4>
<span class="img-with-text-span">By Adriana Huber 30.06.2020</span>
</div>
</div>
<div class="bottom-message">
<div class="bottom-message-content">
<h1 class="bottom-message-h1">The rich are getting richer</h1>
<p class="bottom-message-content-p">And so can you. By becoming an online trader of currencies, stocks and commodities, you too can increase your monthly income and upgrade your standard of living </p>
<button class="bottom-message-button">Start with free 1-on-1 coaching</button>
</div>
</div>
</section>
<aside>
<div class="aside-first-section">
<h3>Hot Topics</h3>
</div>
<div class="aside-second-section">
<img src="/assets/images/second-column-first-img.PNG" alt="" class="aside-img">
<h2 class="aside-h2">Man steals £ 2,500,000 from the <br> bank with a legal loophole!</h2>
</div>
<div class="aside-third-section">
<img src="/assets/images/second-column-second-img.PNG" alt="" class="aside-img">
<h2 class="aside-h2">Does praying to God for money <br> actually work?</h2>
</div>
<div class="line"></div>
<div class="aside-third-section">
<img src="/assets/images/second-column-sixth-image.png" alt="" class="aside-img">
<h2 class="aside-h2">Japanese scientists have <br> discovored the secret of making money. Find out if it's real.</h2>
</div>
<div class="box-message">
<div class="box-message-content">
<p class="box-message-p">Learn more about online stock trading and how you can profit.</p>
<a class="box-message-a" href="">Start Now</a>
</div>
</div>
<div class="trending-news-div">
<h3>Trending Financial News</h3>
</div>
<div class="aside-third-section">
<img src="/assets/images/second-column-third-image.png" alt="" class="aside-img">
<h2 class="aside-h2">Royal family goes bancrupt. <br> Could be out on the streets very soon.</h2>
</div>
<div class="line"></div>
<div class="aside-third-section">
<img src="/assets/images/second-column-forth-image.png" alt="" class="aside-img">
<h2 class="aside-h2">Man wins the lottery and blows it <br> all in a Spanish casino.</h2>
</div>
<div class="aside-third-section">
<img src="/assets/images/second-column-fifth-image.png" alt="" class="aside-img">
<h2 class="aside-h2">Silver vs Gold. Our experts give <br> you the breakdown.</h2>
</div>
</aside>
</div>
</div>
<div class="footer">
<section class="footer-section">
<div class="footer-content">
<p class="capital-words">TERMS AND CONDITIONS CAREFULLY READ AND AGREE TO TERMS BELOW:</p>
<br>
<p>We are not affiliated in any way with any news publication. All trademarks on this web site whether registered or not, are the property of their respective owners. The authors of this web site are not sponsored by or affiliated with any of the third-party trade mark or third-party registered trade mark owners, and make no representations about them, their owners, their products or services. It is important to note that this site and the comments/answers depicted above is to be used as an illustrative example of what some individuals have achieved with this/these products. The website, and any page on the website, is based loosely off a true story, but has been modified in multiple ways including, but not limited to: the story, the photos, and the comments. Thus, this page, and any page on this website, are not to be taken literally or as a non-fiction story. Ther page, and the results mentioned on this page, although achievable for some, are not to be construed as the results that you may achieve on the same routine. I UNDERSTAND THIS WEBSITE IS ONLY ILLUSTRATIVE OF WHAT MIGHT BE ACHIEVABLE FROM USING THIS/THESE PRODUCTS, AND THAT THE STORY/COMMENTS DEPICTED ABOVE IS NOT TO BE TAKEN LITERALLY. Ther page receives compensation for clicks on or purchase of products featured on this site.</p><br>
<p class="capital-words">IMPORTANT CONSUMER DISCLOSURE</p><br>
<p>The term "advertorial" is a combination of "advertisement" and "editorial" written in an editorial format as an independent news story, when in fact the advertisement may promote a particular product or interest. Advertorials take factual information and report it in an editorial format to allow the author, often a company marketing its products, to enhance or explain certain elements to maintain the reader's interest. A familiar example is an airline's in-flight magazines that provide an editorial reports about travel destinations to which the airline flies.</p><br>
<p>As an advertorial, I UNDERSTAND THIS WEBSITE IS ONLY ILLUSTRATIVE OF WHAT MIGHT BE ACHIEVABLE FROM USING THIS PROGRAM, AND THAT THE STORY DEPICTED ABOVE IS NOT TO BE TAKEN LITERALLY. Ther page receives compensation for clicks on or purchase of products featured on this site. Ther program is not a job but an educational opportunity that can help individuals learn how to earn money through their entrepreneurial efforts. Anyone who decides to buy any program about making money will not necessarily make money simply by purchasing the program. People who think "I bought these materials so I'm going to automatically make money" are wrong. As any type of education has so many variables, it is impossible to accurately state what you may expect to achieve, however, people who bought the program not only bought the program, but also undertook additional training and education, applied the principles to an area of the market that was growing, kept their commitments and continued to learn. If you do what the individuals depicted did, you may generally expect to achieve a great education in the area of your choice, but you should not expect to earn any specific amount of money. Typical users of the starter materials that don't enroll in coaching, don't keep their commitments and don't implement what they learn, generally make no money. Though the success of the depicted individual is true, her picture and name have been changed to protect her identity. Consistent with the advertorial concept, the comments posted in the comment section are also representative of typical comments and experiences which have been compiled into a comment format to illustrate a dialogue, however, the comments are not actual posts to this webpage and have been compiled or generated for illustrative purposes only.</p><br>
<p>We are not affiliated in any way with CNN, WebTV, News Channel 1, ABC, NBC, CBS, U.S. News or FOX, and all such trademarks on this web site, whether registered or not, are the property of their respective owners. The authors of this web site are not sponsored by or affiliated with any of the third-party trade mark or third-party registered trade mark owners, and make no representations about them, their owners, their products or services.</p>
</div>
<div class="footer-links">
<a class="footer-links-a" href="">Cookie Policy</a>
<a class="footer-links-a" href="">Privacy Policy</a>
<a class="footer-links-a" href="">Data Processing Agreement</a>
<a class="footer-links-a" href="">Terms and Conditions</a>
</div>
<p class="testimonials-p">*Testimonials:
All characters, information and events depicted on This Website are entirely fictitious. Any similarity to actual events or persons, living or dead, is purely coincidental.</p>
<p class="copyright-p">© fortunetonight.com 2020</p>
</section>
</div>
</div>
I tried setting the width in pixels and ems but that still doesn't fix the issue
You have a width of 800px set on .footer-links
That means, no matter how wide your window is, it will keep it at 800px which will make you scroll side to side.
Change the width of .footer-links to be 100% or just remove it all together and that should fix it.
You could use the #media rule in your css..
#media(max-width: 1000px){
.footer-links {
width: 600px;
margin: 0 auto;
margin-top: 50px;
}
}
Link to more on #media --> https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
so I'm a beginner and I started this project by first writing CSS in styles.scss and then transforming the code inside of it using scss tools. I made an each loop to loop through a set of colors in my color map, placed in a mixin and put that mixin under [class^=btn].
I don't know why this doesn't work?
Here is my SCSS:
//colors
$base-grey: #808080;
$base-white: #ffffff;
$base-green: #71eeb8;
$base-blue: #2dcae6; //base-success: #33c052;
$base-red: #ff6666; //red
$base-orange: #ff751a; //warning
$base-purple: #8a54f7; //info
// grid base class
.grid {
// .grid__row
&__row {
padding: 1em 10px;
display: flex;
flex-direction: column;
// NOTE: replace with media query mixin if aiming for exceeds
#media (min-width: 768px) {
flex-direction: row;
}
}
// .grid__col
&__col {
// create grid columns dynamically
// loop through each column size
#for $i from 1 through 12 {
// concatenate CSS selector, ie when $i = 1,
// selector would be .grid__col--1
&--#{$i} {
// base styles applied to all grid columns
// NOTE: could be converted to a placeholder, along with margin
// from the media query
margin-top: 10px;
flex-basis: 100%;
border: 1px red solid;
// NOTE: replace with media query mixin if aiming for exceeds
#media (min-width: 768px) {
// base stlyes applied to all grid columns
margin-top: 0;
// make column width a percentage of the column number / total columns
flex-basis: #{$i / 12 * 100 + "%"} ;
}
}
}
}
}
// targets all elements with classes that begin with grid__col
[class^=grid__col] {
// grid__col + grid__col, targets two sibling columns
& + & {
// NOTE: replace with media query mixin if aiming for exceeds
#media (min-width: 768px) {
// add grid gutter
margin-left: 10px;
}
}
}
.grid {
&__row {
display: flex;
}
}
//BASE
.container {
text-align: left;
font-family: 'Arial Narrow', Arial,sans-serif;
color: $base-grey;
padding: 5px;
font-weight: 500;
}
p {
text-align: left;
line-height: 1.3;
}
a {
text-decoration: none;
}
//NAVIGATION
.nav {
list-style-type: none;
padding: 0;
text-align: center;
}
.nav__item a {
display: block;
color: inherit;
margin: 8px 0;
padding: 8px;
}
.nav__item a:hover {
color: $base-white;
background-color: $base-green;
}
//TYPOGRAPHY
//link
.link {
color: $base-blue;
font-weight: bold;
}
//blockquote
.blockquote {
border-left: $base-green 8px solid;
padding-left: 10px;
font-style: oblique;
font-size: 1.2em;
}
// headlines
#mixin h2-font-weight {
font-weight: 100;
}
.headline--primary {
color: $base-green;
margin-left: 10px;
}
.headline--secondary {
text-align: left;
#include h2-font-weight;
}
//FORM
.form {
display: flex;
flex-direction: column;
&__input {
border: none;
border-bottom: 2px solid $base-green;
margin-bottom: 15px;
}
&__label--hidden {
display: none;
}
& .headline--secondary {
#include h2-font-weight;
}
}
//BUTTONS
#mixin button-styles {
display: block;
width: 100%;
border: none;
margin-bottom: 15px;
padding: 10px;
color: $base-white;
text-transform: uppercase;
font-weight: bold;
}
$button-colors :(
default:$base-blue,
success:$base-green,
error:$base-red,
warning:$base-orange,
info:$base-purple
);
#mixin button-colors {
#each $button, $color in $button-colors {
.btn--#{$button} {
background-color: #{$color};
}
}
}
[class*=btn] {
#include button-styles;
}
//IMAGE
#mixin center-images {
display: block;
max-width: 100%;
margin: 0 auto;
padding: 8px;
}
[class^=img] {
#include center-images;
}
.img {
&--frame {
border: 2px solid $base-grey;
}
}
This is my HTML:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Circles UI Kit</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/normalize.css">
</head>
<!--
List of classes used
Grid:
.container
.grid__row
.grid__col--1 *NOT USED HERE
.grid__col--2 *
.grid__col--3
.grid__col--4
.grid__col--5
.grid__col--6
.grid__col--7
.grid__col--8
.grid__col--9
.grid__col--10 *
.grid__col--11 *
.grid__col--12
.card
.centered
.theme__colors
(.grid__col--1, .grid__col--2, .grid__col--10, and .grid__col--11 are not used here in the HTML but would be good to include in the Sass)
Typography:
.container
.link
.blockquote
.headline--primary
.headline--secondary
Image:
.img--logo
.img--frame
.img--avatar
Navigation:
.nav
.nav__item
Buttons:
.btn--default
.btn--success
.btn--error
.btn--warning
.btn--info
.theme__colors
Forms:
.form
.form__label--hidden
.form__input
-->
<body class="container">
<div class="grid__row">
<div class="grid__col--3">
<a class="link" href="/">
<img class="img--logo" alt="circles logo" src="images/logo.png">
</a>
</div>
<div class="grid__col--9">
<nav role="navigation">
<ul class="nav">
<li class="nav__item">Typography</li>
<li class="nav__item">Buttons</li>
<li class="nav__item">Form</li>
<li class="nav__item">Images</li>
<li class="nav__item">Grid</li>
</ul>
</nav>
</div>
</div>
<div class="grid__row">
<div class="grid__col--12">
<div class="card">
<p>This is what the navigation menu looks like when the screen is at 769px or higher. When the screen is less
than 769px,
the menu will be displayed vertically.</p>
</div>
</div>
</div>
<div class="grid__row">
<div class="grid__col--8">
<div class="card">
<h4 id="type" class="headline--secondary">Typography</h4>
<h1 class="headline--primary">Take a look at this amazing headline</h1>
<p>This is a typical paragraph for the UI Kit. Here is what a link might look like.
The
typical font family for this kit is Helvetica Neue. This kit is intended for clean and refreshing web layouts.
No jazz hands here, just the essentials to make dreams come true, with minimal clean web design. The kit comes
fully equipped with everything from full responsive media styling to buttons to form fields. <em>I enjoy using
italics as well from time to time</em>.
Fell free to create the most amazing designs ever with this kit. I truly hope you enjoy not only the kit but
this
amazing paragraph as well. :)</p>
<blockquote class="blockquote">You know what really gets me going? A really nice set of block quotes. That's
right, block quotes that say, "Hey,
I'm an article you want to read and nurture."</blockquote>
</div>
</div>
<div class="grid__col--4">
<form class="form">
<legend id="forms" class="headline--secondary">Form Elements</legend>
<img class="img--avatar" src="images/avatar.png" alt="Avatar">
<label class="form__label--hidden" for="username">Username:</label>
<input class="form__input" type="text" id="username" placeholder="Username">
<label class="form__label--hidden" for="password">Password:</label>
<input class="form__input" type="password" id="password" placeholder="Password">
<button class="btn--default theme__colors" type="submit" value="Login">Login</button>
</form>
</div>
</div>
<h4 id="images" class="headline--secondary">Images</h4>
<div class="grid__row">
<div class="grid__col--6">
<img class="img--frame" src="images/image.png" alt="sample image">
</div>
<div class="grid__col--6">
<img class="img--avatar" src="images/avatar.png" alt="Avatar">
</div>
</div>
<h4 id="buttons" class="headline--secondary">Buttons</h4>
<div class="grid__row">
<div class="grid__col--12">
<button class="btn--default theme__colors">default</button>
<button class="btn--success theme__colors">success</button>
<button class="btn--error theme__colors">error</button>
<button class="btn--warning theme__colors">warning</button>
<button class="btn--info theme__colors">info</button>
</div>
</div>
<h4 id="grid" class="headline--secondary">Grid System</h4>
<div class="grid__row">
<div class="grid__col--12 theme__colors">.grid__col--12</div>
</div>
<div class="grid__row">
<div class="grid__col--6 theme__colors">.grid__col--6</div>
<div class="grid__col--6 theme__colors">.grid__col--6</div>
</div>
<div class="grid__row">
<div class="grid__col--4 theme__colors">.grid__col--4</div>
<div class="grid__col--4 theme__colors">.grid__col--4</div>
<div class="grid__col--4 theme__colors">.grid__col--4</div>
</div>
<div class="grid__row">
<div class="grid__col--3 theme__colors">.grid__col--3</div>
<div class="grid__col--3 theme__colors">.grid__col--3</div>
<div class="grid__col--3 theme__colors">.grid__col--3</div>
<div class="grid__col--3 theme__colors">.grid__col--3</div>
</div>
<div class="grid__row">
<div class="grid__col--5 theme__colors">.grid__col--5</div>
<div class="grid__col--7 theme__colors">.grid__col--7</div>
</div>
<div class="grid__row">
<div class="grid__col--8 theme__colors">.grid__col--8</div>
<div class="grid__col--4 theme__colors">.grid__col--4</div>
</div>
<div class="grid__row">
<div class="grid__col--7 theme__colors centered">.centered .grid__col--7</div>
</div>
</body>
</html>
You are missing two things:
The mixin of button colours need to be:
#mixin button-colors {
#each $button, $color in $button-colors {
&.btn--#{$button} {
background-color: #{$color};
}
}
}
with & before .btn.
You didn't call your mixin. You need to write:
[class*=btn] {
#include button-styles();
#include button-colors();
}
I am working on a project here: https://jsfiddle.net/x3rceway/
And I am stuck cause I can't make all of my boxes have a fixed size even there is extra space on the bottom for as long the button is always down below. I am expecting to have something like this:
CLICK HERE IMAGE SCREENSHOT
Here's my HTML:
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2017/01/The-Bitcoin-Transaction-Landscape.jpg" />
<h3 style="text-align: center;">BC 101 - The Bitcoin Transaction COURSE</h3>
<p>This course covers the basics of what Bitcoin is and how the Blockchain works, how to use a Bitcoin Wallet and why Bitcoin is important.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2017/02/Intro-Logo-Horizontal.jpg" alt="" />
<h3 style="text-align: center;">TR 101 - Introduction to Bitcoin Trading</h3>
<p>This course is the introductory course for Bitcoin trading. It will teach you the basics and several of the important tools and need-to-know issues and topics to get up and running.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2016/12/Pro-Logo-Horizontal.jpg" />
<h3 style="text-align: center;">TR 201 - The Professional Bitcoin Trading Course</h3>
<p>This course covers all of our offerings in one. This is for entrepreneurs who are serious about making serious income through Bitcoin trading. This course teaches how to get set up, what to watch out for, copy to paste into your ads, how to manage your customers, how to not get scammed, how to scale, etc. This also includes an inclusion into a private traders group with your class so you can discuss and figure out new ways to make money together.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div style="clear: both;"></div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2016/12/Pro-Logo-Horizontal.jpg" />
<h3 style="text-align: center;">Bitcoin Trading Bootcamp</h3>
<p>This is similar in nature to The Professional Bitcoin Trading Course in the sense that we will cover all of the same topics covered in that course, plus up to date relevant ones, live and in person. You will also get a chance to watch pro traders trade live and learn how they manage several trades at the same time, what to do, what not to do, etc. This also includes an inclusion into a private traders group with your class so you can discuss and figure out new ways to make money together.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
Here's my CSS:
.col-1-3 {
padding: 10px;
width: 28%;
float: left;
margin: 2.5%;
border: 2px solid #000;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
padding-bottom: 0px;
font-family: 'Lato', Verdana;
}
.col-1-3 img {
width: 100%;
}
.col-1-3 img {
width: 100%;
}
a {
margin: 0;
}
h3 {
margin: 15px auto;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
}
p{
line-height: 16px;
margin: 10px auto;
}
h4 {
margin: 0 0 20px 0;
}
}
.btn-block {
display: block;
width: 100%;
margin-top: 22px;
background: #DD374D;
}
button.btn-block{
background: #DD374D;
font-family: 'Roboto';
margin-bottom: 10px;
font-weight: bold;
}
}
#media only screen and (max-width: 767px) {
.col-1-3 {
width: 44%;
}
}
#media only screen and (max-width: 590px) {
.col-1-3 {
width: 94%;
}
}
How can I fixed the height of the boxes without affecting my design and the responsiveness? Please use my JSFIDDLE to show me how to fixed it.
Give the boxes a parent and assign display: flex; flex-wrap: wrap; to the parent, and the height of the boxes in each row will match.
.col-1-3 {
padding: 10px;
width: 28%;
float: left;
margin: 2.5%;
border: 2px solid #000;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
padding-bottom: 0px;
font-family: 'Lato', Verdana;
}
.col-1-3 img {
width: 100%;
}
.col-1-3 img {
width: 100%;
}
a {
margin: 0;
}
h3 {
margin: 15px auto;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
}
p{
line-height: 16px;
margin: 10px auto;
}
h4 {
margin: 0 0 20px 0;
}
}
.btn-block {
display: block;
width: 100%;
margin-top: 22px;
background: #DD374D;
}
button.btn-block{
background: #DD374D;
font-family: 'Roboto';
margin-bottom: 10px;
font-weight: bold;
}
}
#media only screen and (max-width: 767px) {
.col-1-3 {
width: 44%;
}
}
#media only screen and (max-width: 590px) {
.col-1-3 {
width: 94%;
}
}
.flex {
display: flex;
flex-wrap: wrap;
}
<div class="flex">
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2017/01/The-Bitcoin-Transaction-Landscape.jpg" />
<h3 style="text-align: center;">BC 101 - The Bitcoin Transaction COURSE</h3>
<p>This course covers the basics of what Bitcoin is and how the Blockchain works, how to use a Bitcoin Wallet and why Bitcoin is important.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2017/02/Intro-Logo-Horizontal.jpg" alt="" />
<h3 style="text-align: center;">TR 101 - Introduction to Bitcoin Trading</h3>
<p>This course is the introductory course for Bitcoin trading. It will teach you the basics and several of the important tools and need-to-know issues and topics to get up and running.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2016/12/Pro-Logo-Horizontal.jpg" />
<h3 style="text-align: center;">TR 201 - The Professional Bitcoin Trading Course</h3>
<p>This course covers all of our offerings in one. This is for entrepreneurs who are serious about making serious income through Bitcoin trading. This course teaches how to get set up, what to watch out for, copy to paste into your ads, how to manage your customers, how to not get scammed, how to scale, etc. This also includes an inclusion into a private traders group with your class so you can discuss and figure out new ways to make money together.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
<div style="clear: both;"></div>
<div class="col-1-3">
<img src="http://americanbitcoinacademy.com/wp-content/uploads/2016/12/Pro-Logo-Horizontal.jpg" />
<h3 style="text-align: center;">Bitcoin Trading Bootcamp</h3>
<p>This is similar in nature to The Professional Bitcoin Trading Course in the sense that we will cover all of the same topics covered in that course, plus up to date relevant ones, live and in person. You will also get a chance to watch pro traders trade live and learn how they manage several trades at the same time, what to do, what not to do, etc. This also includes an inclusion into a private traders group with your class so you can discuss and figure out new ways to make money together.</p>
<button class="btn btn-block btn-primary">PURCHASE COURSE →</button>
</div>
</div>
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 :)!