Responsive Design without bootstrap - html

I'm having a bit of a design issue with a website I'm trying to build in that I can't get it to be responsive to the different screen resolutions.
html,
body {
margin: 0 auto;
font-family: 'Roboto', sans-serif;
}
.menubar {
position: absolute;
z-index: 150;
}
#logo {
width: 550px;
position: absolute;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
top: 40%;
}
.menubar ul,
li,
a {
display: inline-block;
text-decoration: none;
color: white;
padding: 10px;
z-index: 1000;
}
.menubar a:hover {
text-decoration: underline;
}
.menubar.two a {
color: black;
}
.slider-contain {
height: 100vh;
width: 100%;
overflow: hidden;
z-index: -1;
}
.a-slide {
background-size: cover !important;
}
.slick-slider {
height: 100%;
width: 100%;
z-index: -1;
}
.slick-list,
.slick-track {
height: 100%;
}
.overlay {
height: 100%;
width: 100%;
position: absolute;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
}
.overlay p {
color: white;
position: absolute;
font-size: 30px;
width: auto;
top: 85%;
font-family: 'Caveat', cursive;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%)
}
.overlay h2 {
font-size: 30px;
color: white;
width: auto;
top: 90%;
position: absolute;
font-family: 'Caveat', cursive;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%)
}
.brand-wrap {
border-bottom: 1px black solid;
}
.item {
width: 500px;
margin: 30px;
display: inline-block;
}
.slick-slidertwo {
height: 100%;
width: 100%;
}
.overlay-about {
height: 100%;
width: 100%;
position: absolute;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
color: white;
}
.wrap-about {
width: 50%;
padding-top: 175px;
padding-left: 65px;
}
.overlay-about p {
line-height: 27px;
width: 700px;
}
.overlay-about h1 {
color: goldenrod;
}
#about {
text-decoration: none;
line-height: 0;
font-size: 0;
}
.wrap-service {
padding-top: 95px;
padding-left: 100px;
}
.services h1 {
color: goldenrod;
margin-left: -20px;
}
.services p {
line-height: 30px;
margin-left: -20px;
width: 52%
}
#s1 {
width: 600px;
height: 600px;
margin-right: 60px;
display: block;
-webkit-box-shadow: 5px 10px 16px 1px rgba(0, 0, 0, 0.41);
-moz-box-shadow: 5px 10px 16px 1px rgba(0, 0, 0, 0.41);
box-shadow: 5px 10px 16px 1px rgba(0, 0, 0, 0.41);
}
#underline {
width: 50%;
float: left;
margin-top: -20px;
margin-left: -20px;
}
.service-images {
float: right;
margin-top: 50px;
}
.service-items {
width: 63%;
display: inline-block;
margin-left: -43px;
}
.wrap-service h1 {
font-size: 55px;
color: goldenrod;
}
.empty {
height: 100px;
}
.footer {
width: 100%;
height: 50px;
border-top: lightgrey 1px solid;
text-align: center;
}
#googleMap {
width: 80%;
height: 100vh;
float: left;
}
.contact-wrap {
width: 100%;
display: table;
}
.contact {
height: 100vh;
width: 19.8%;
float: right;
border-left: 2px solid black;
}
.menubar.two {}
.contact p {
line-height: 10px;
text-align: center;
font-weight: bold;
}
/* Smartphones (portrait and landscape) ----------- */
#media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* Smartphones (landscape) ----------- */
#media only screen and (min-width: 321px) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* Smartphones (portrait) ----------- */
#media only screen and (max-width: 320px) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* iPads (portrait and landscape) ----------- */
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* iPads (landscape) ----------- */
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* iPads (portrait) ----------- */
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* Desktops and laptops ----------- */
#media only screen and (min-width: 1224px) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
/* Large screens ----------- */
#media only screen and (min-width: 1824px) {
/* Styles */
}
/* iPhone 4 ----------- */
#media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
<!Doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>R&R Cycle: Motorcycle and ATV Service Center</title>
<!-- Main CSS + Slick Slider CSS Files -->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="slick/slick/slick.css" />
<link rel="stylesheet" type="text/css" href="slick/slick/slick-theme.css" />
<!-- Google Fonts, FontAwesome, Favicon, Crawler JS for brands scroll -->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Caveat" rel="stylesheet">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon-motorcycle.ico" />
<script src="js/crawler.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="fa/css/font-awesome.min.css">
<!-- JQuery -->
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<!-- AOS for scroll animations -->
<script src="aos-master/dist/aos.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="aos-master/dist/aos.css" /> </head>
<body>
<!-- Start Menu -->
<div class="menubar">
<ul class="mainmenu">
<li><a style="color:goldenrod;" href="#home">Home</a></li>
<li>About</li>
<li>Services</li>
<li>Part Catalogs</li>
<li>Contact / Hours</li>
</ul>
</div>
<!-- Splash Page Slider + Overlay info -->
<div class="slider-contain">
<div class="overlay">
<img id="logo" align="right" src="img/R&R.png" alt="">
<p>Service and Repair for All Makes and Models Since 1979!</p>
<h2>Call Us Today: 845-336-5910</h2>
</div>
<div class="slick-slider">
<div class="a-slide" style="background: url('img/slider-4.jpeg') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/slider-2.jpeg') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/slider-3.jpeg') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/slider-5.jpg') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/sunset-summer-motorcycle.jpg') no-repeat center center"></div>
</div>
</div>
<!--Brands slider w/ Crawler JS -->
<br />
<div class="brand-wrap">
<div id="brands"> <img id="banner" src="img/banner.jpg" /> </div>
</div>
<!-- End Brand Slider -->
<!-- About Us Slider + Info -->
<div class="slider-contain">
<div class="overlay-about">
<a id="about"></a>
<div class="wrap-about">
<h1>About "The Shop"</h1>
<p data-aos="fade-up">We are nestled in the scenic Catskill mountains in the Hudson River Valley, home to some of the best riding areas in the northeast. Situated about 2 hrs. north of New York City and just a few miles from I-87 (New York State Thru-Way) exit 19,
Kingston. R&R Cycle was started in 1979 by brothers Frank Rua & Henry Rua.
<br/>
<br /> As in many small businesses, it was launched out of the passion and enjoyment of the sport, along with the frustration with impersonal, overpriced corporate dealership attitude. With Frank's technical skills from his AMI (American Motorcycle
Institute) certification and Henry's business knowledge, R&R Cycle was born. In 1985 Steve Mulford joined our shop family. Steve also attended and became certified at AMI in Daytona Beach, Florida. He has a vast acquired knowledge of motorcycles
and ATVs. With almost 30 years of experience in real world shop situations, he has no equal in our area. Frank and Steve are both lifetime career mechanics, enthusiasts, and advocates for safe and responsible riding. We continue after almost
40 years to be small enough and personal, but yet large enough to attend to all your powersports needs. We have acquired a huge network of suppliers, vendors, and salvage yards all over the USA for hard to find items and parts. If you are in
our area please stop bye and say, Hi.</p>
</div>
</div>
<div class="slick-slidertwo">
<div class="a-slide" style="background: url('img/a1.JPG') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/a2.JPG') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/a3.JPG') no-repeat center center"></div>
</div>
</div>
<!-- End About Us -->
<!-- AOS: http://michalsnik.github.io/aos/ -->
<div class="wrap-service">
<a id="services"></a>
<div class="services">
<h1 style="font-size:45px;">A Business Built On Service.</h1>
<div class="service-images">
<div id="s1" class="slick-serviceone">
<div class="a-slide" style="background: url('img/s1.JPG') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/s2.JPG') no-repeat center center"></div>
<div class="a-slide" style="background: url('img/s3.JPG') no-repeat center center"></div>
</div>
</div>
<p data-aos="fade-up"> Our Business is built on service. Together, Frank and Steve have over 50 years of real world shop experience. They are both AMI (American Motorcycle Institute) Certified mechanics. We have been in the same location for over 30 years. Our goal is
to get the job done right the first time. Listening and understanding our customers and their needs is essential to achieving this goal.
<br />
<br />In addition to the usual tune ups, we sell and install hundreds of top name brand tires each season with state of the art mounting and computer tire balancing equipment. We are second to none for carburetor and electrical troubleshooting,
diagnosis, repair. Our new Ultrasonic carb cleaning tank does a great job. Complex electrical charging & ignition systems on modern units require accurate testing before expensive components are purchased. Whether its motorcycles or ATV's. </p>
</div>
<br />
<br />
<hr id="underline">
<div class="service-items">
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Complete engine overhauls- top end - bottom end</div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Transmission rebuilds - shift forks - gears - etc...</div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Wheel lacing & truing</div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Crankshaft rebuilding </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Fork tube straightening </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Cylinder boring/honing </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Valve reconditioning </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Front end alignment </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Accident damage </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Pre Purchase appraisal of used cycles / ATV's </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Pick Up & Delivery Available </div>
<div class="item" data-aos="flip-up"><i class="fa fa-check-circle-o" aria-hidden="true"></i> Custom fabrication- lighting,wheels,fenders,exhaust, etc...</div>
</div>
<!-- Temp Break to see animation for all items -->
</div>
<div class="empty"></div>
<!-- Footer for Copyright and stuff like that, a little fame for me... -->
<div class="footer">
<p style="color:grey;">© 2017 R&R Cycle Inc. | Designed By Frank Rua. | frankselectronicmail#gmail.com</p>
</div>
<!-- End footer -->
<!-- --------------------------<Scripts>---------------------------------- -->
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="slick/slick/slick.min.js"></script>
<script src="js/slideshow.js" type="text/javascript"></script>
<script src="js/smoothscroll.js" type="text/javascript"></script>
<script src="js/banner.js" type="text/javascript"></script>
<script src="js/aso.js" type="text/javascript"></script>
</body>
</html>
I pulled the media queries from another site to speed that process up, but I've tried a couple different methods to transform my CSS and nothing is working. Including making my Text "Divs" smaller when the screen gets smaller but all that does is cut off the text more because the location changes. This is the last solution I tried was just transforming the body of the page using:
left: x%;
transform: translate(-x%, -x);
top: x%;
Which gave me no progress just a page that was split by a certain percentage. I've been reading articles on how to do this and I just can't get a grasp on it ;Responsive design is something I'm fairly new to and I'm not exactly sure how to transform this. Can somebody give me an example with this webpage so I can see?
Here's a Screenfly so you can see what I'm talking about, the text under "The Shop" is cut off.
Screenfly Example
I know it's easy to downvote a question like this, but I'd rather have someboyd give me a real life example with the webpage I'm working with and then an explanation not a generic example taken off the internet, which is what I'm struggling with at the moment. Thank you everyone!

Your media queries will not work, cause you not put any css selector to apply styles to. Please look this simple media queries example.
p{
font-family: arial,san-serif;
font-size: 13px;
font-color: black;
}
h1{
font-size:30px;
}
#media screen and (min-width:761px){
body{
background-color:white;
}
h1{
color:red;
}
}
#media screen and (max-width:760px){
body{
background-color: #333;
}
h1{
color:red;
}
p{
color: white;
}
}
#media screen and (max-width:480px){
body{
background-color: #807f83;
}
h1{
color:white;
}
p{
color: white;
}
}
#media screen and (max-width:360px){
body{
background-color: #0096d6;
}
h1{
color:white;
font-size:25px;
}
p{
color: white;
}
}
In media queries you should add css selector and then style rules to apply

Related

How do I get rid of the gap of color between the footer and my copyright section?

I have put down below my HTML and CSS. I can't figure out why the gap is there and the bottom. I will put a picture in as well.
My Code :
/*
Landon Byrd
Fall 2021
Light Blue #06aed5
Darker Blue #086788
Cream White #f2f4f3
Yellow #f0c808
Rich Red #dd1c1a
Black #333
*/
/* Global Settings */
h1 {text-align: center}
h2 {text-align: center; color: #086788;}
h3 {text-align: center; color: #086788; text-decoration: underline #f2f4f3; text-shadow: 2px 2px #f2f4f3;}
.wrapper{width:85%; margin:0 auto; max-width: 960px; }
/* Nav Section */
/* Add a black background color to the top navigation */
.topnav {
position: relative;
background-color: #333;
overflow: hidden;
}
/* Style the links inside the navigation bar */
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
/* Change the color of links on hover */
.topnav a:hover {
background-color: #ddd;
color: black;
opacity: 0.5;
}
/* Add a color to the active/current link */
.topnav a.active {
background-color: #f0c808;
color: white;
}
/* Centered section inside the top navigation */
.topnav-centered a {
float: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/* Responsive navigation menu - display links on top of each other instead of next to each other (for mobile devices) */
#media screen and (max-width: 600px) {
.topnav a, .topnav-right {
float: none;
display: block;
}
.topnav-centered a {
position: relative;
top: 0;
left: 0;
transform: none;
}
}
/* Main Section */
.banner{justify-content: center;background-color: #333; border-radius: 2pt; color: #f2f4f3; border-radius: 5%;}
.name{font-weight: bold; color: #f0c808}
.column {
float: left;
width: 50%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
.img1 {float:left; width: 300px; height: 350px; margin:15px; border-radius: 20%;}
.img2 {float: right; width: 330px; height: 350px; border-radius: 20%;}
body {
background-image: url("images/background.jpg");
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
font-size: 16px
}
/* Footer Section */
*{box-sizing: border-box;}
.footer{text-align: center; background-color: #333; color: #f2f4f3; }
.box{float:left; width: 33.33%;}
.footer::after{content: ""; clear:both; display:table;}
/* copyright section */
.copyright {text-align: center; background-color: #333; color: #f2f4f3; }
/* Menu */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 1.5em;
}
.menu {
font-family: "Inter", sans-serif;
font-size: 14px;
}
.menu-group-heading {
margin: 0;
padding-bottom: 1em;
border-bottom: 2px solid #ccc;
}
.menu-group {
display: grid;
grid-template-columns: 1fr;
gap: 1.5em;
padding: 1.5em 0;
}
.menu-item {
display: flex;
}
.menu-item-image {
width: 80px;
height: 80px;
flex-shrink: 0;
object-fit: cover;
margin-right: 1.5em;
}
.menu-item-text {
flex-grow: 1;
}
.menu-item-heading {
display: flex;
justify-content: space-between;
margin: 0;
}
.menu-item-name {
margin-right: 1.5em;
}
.menu-item-description {
line-height: 1.6;
}
#media screen and (min-width: 992px) {
.menu {
font-size: 16px;
}
.menu-group {
grid-template-columns: repeat(2, 1fr);
}
.menu-item-image {
width: 125px;
height: 125px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>SuperRestraunt</title>
<meta charset="utf-8">
<link href="Style.css" rel="stylesheet">
</head>
<body>
<!-- Top navigation -->
<div class="topnav">
<!-- Centered link -->
<div class="topnav-centered">
Home
</div>
<!-- Left-aligned links (default) -->
Menu
Contact
<!-- Right-aligned links -->
<div class="topnav-right">
Search
About
</div>
</div>
<main class="wrapper">
<div class="banner">
<h1><span class="name">SuperRestraunt</span></h1>
<h2>Serving the best food in Macon since 2015.</h2>
<h3>Coupons and Weekly Advertisement.</h3>
<div class="row">
<div class="column">
<img src="images/coupon1.jpg" alt="Snow" style="width:100%">
</div>
<div class="column">
<img src="images/coupon2.jpg" alt="Forest" style="width:100%">
</div>
</div>
<br>
</div>
<div class="row">
<div class="column"></div>
<img class="img1" src="images/burger.jpg" alt="burger">
<div class="column"></div>
<p> Are you looking for the best southern cooking in all of middle Georgia? If so, you have looked in the right place!</p>
<p> Our chefs have over 30 years in combined experience</p>
<h2>About the Owner</h2>
<img class="img2" src="images/chef.jpg" alt="chef">
<p>Executive chef Nicholas St. Clair knew he wanted to do something extraordinary from a young age. Little did he know, his budding culinary expertise would launch him into a whirlwind adventure in the fine dining industry. St. Clair, who graduated with high honors from the California Culinary Institute in Pasadena, CA, polished his cuisine with some of America’s premier chefs over the past five years. St. Clair and his wife, Alison, ventured into the restaurant business with determination for success and passion for fine cuisine. e took a blind leap of faith and opened a place of his own.</p>
</div>
<h2><em>Contact us for a reservations</em></h2>
<p>Please call at least 2 days ahead for all reservations that include 10 or more people.</p>
</main>
<!-- Footer -->
<footer class="footer">
<div class="box">
<p>SuperRestraunt</p>
<p>(478) 302-1981</p>
<p>manager#superrestraunt.com</p>
<p>Contact us via Skype by clicking the following link</p>
<a href="skype:echo123?call">
Call Us Today!
</a>
<br/>
</div>
<div class="box">
<p>Check out are Social Media for more coupons and pictures!</p>
<p>Facebook:</p>
<p>Instagram:</p>
<p>Twitter:</p>
</div>
<div class="box">
<p>Locations:</p>
<br/>
<p>543 Cherry St suite b, Macon, GA 31201</p>
</div>
</footer>
<div class="copyright">
<h2>#copyright: Landon Byrd</h2>
<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>
Back to top of page
</body>
</html>
I am also wondering how to change the hyperlink text color that is in my footer, as well as changing the back to top into a button. Thanks for the help! If needed I can post separate questions for those though.
To Change the color of hyperlink Back to top of page in footer and put it into a button.
Simply you can use this code snippet to change the font color of hyperlink and keep it into a button.
/* Footer Section */
.footer .top_a{
color : Red;
text-decoration: none;
font-size: 1.4rem;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>SuperRestraunt</title>
<meta charset="utf-8">
<link href="Style.css" rel="stylesheet">
</head>
<body>
<footer class = 'footer'>
<button class = 'top_btn'> <a href="#top" class = 'top_a'>Back to top of page</a> </button>
</footer>
</body>
</html>
If you want to make the button more nicely just add this CSS part to your CSS file.
/* Footer Section */
.footer .top_btn{
background : #1f1f1f;
border : none;
border-radius : 5px;
width : 200px;
height : 50px;
}
.footer .top_a{
color : #efefef;
text-decoration: none;
font-size:16px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>SuperRestraunt</title>
<meta charset="utf-8">
<link href="Style.css" rel="stylesheet">
</head>
<body>
<footer class = 'footer'>
<button class = 'top_btn'> <a href="#top" class = 'top_a'>Back to top of the page</a> </button>
</footer>
</body>
</html>

section overlap in moblie mode css

I'm new to HTML and CSS and I'm trying to design a website from some source code that I found.
When I open the page on the web, It shows as follows:
When I open this page of a mobile device it appears as follows:
When on a mobile device, the section of Download the app overlaps the phone image that I added.
How can I make sure that the whole blue section will be below the image?
The parts of the .css that I found relevant are:
.home-image-right {
display: block;
position: absolute;
right: 0;
top: 55%;
-webkit-transform: translateY(-68%);
-ms-transform: translateY(-68%);
transform: translateY(-68%);
padding-top: 21rem;
z-index: 500;
width: 50%;
text-align: right;
}
.home-image-right img {
vertical-align: bottom;
width: 75%;
}
#download {
background: #2c80c4;
color: #ffffff;
padding-top: 12rem;
padding-bottom: 12rem;
text-align: center;
}
#download h1 {
color: #ffffff;
}
#download h1::before {
background-color: #ffffff;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
#download .lead {
color: #ffffff;
margin-top: 4.8rem;
}
#download .row {
max-width: 800px;
}
#download .download-badges {
list-style: none;
margin: 0;
text-align: center;
}
#download .download-badges li {
display: inline-block;
margin: 0 7.5px;
padding-left: 0;
}
#download .download-badges li a {
display: block;
width: 230px;
height: 71px;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-repeat: no-repeat;
background-position: center;
background-size: 230px 71px;
}
<div class="overlay"></div>
<div class="home-content">
<div class="row contents">
<div class="home-content-left">
<img src="images/logo.png" srcset="images/logo.png 1x" data-aos="fade-up">
<h1 data-aos="fade-up">
....
</h1>
<div class="buttons" data-aos="fade-up">
<a href="#download" class="smoothscroll button stroke">
<span class="icon-circle-down" aria-hidden="true"></span> Download App
</a>
</div>
</div>
<div class="home-image-right">
<img src="images/screen.png" srcset="images/screen.png 1x" data-aos="fade-up">
</div>
</div>
</div>
<!-- end home-content -->
<div class="home-scrolldown">
<a href="#about" class="scroll-icon smoothscroll">
<span>Scroll Down</span>
<i class="icon-arrow-right" aria-hidden="true"></i>
</a>
</div>
</section>
<!-- end home -->
<!-- download
================================================== -->
<section id="download">
<div class="row">
<div class="col-full">
<h1 class="intro-header" data-aos="fade-up">Download Our App Today!</h1>
<ul class="download-badges">
<li>Play Store</li>
</ul>
</div>
</div>
</section>
<!-- end download -->
Thank you
you may style your website with two specific css coding one is for desktop view and other one is for mobile view you want to use this media tag and write your css for mobile view into this
you may change the max-with value since 1px
it make if your device width is smaller than 600px it change the background-color to light blue
#media only screen and(max-width: 600px){
body{
background-color:light blue;
}
}
https://www.w3schools.com/css/css3_mediaqueries_ex.asp
Hmm that´s hard to say, without knowing where the image is. But i think this is your problem:
.home-image-right {
display: block;
position: absolute;
right: 0;
top: 55%;
-webkit-transform: translateY(-68%);
-ms-transform: translateY(-68%);
transform: translateY(-68%);
padding-top: 21rem;
z-index: 500;
width: 50%;
text-align: right;
}
position: absolute.
When assigning a position, you take out this section from the flow.
Take a look here: https://www.w3schools.com/css/css_positioning.asp

Website Looks Fine on Chrome Mobile Debug Version But Looks different on My Phone

Hello I finally finished my portfolio http://ruben123.com/ and I made sure the website is mobile friendly by using the chrome mobile view and adding all of the media queries needed for all mobile devices.
The problem when I look at my website on my phone it looks different.
Please see screenshots below. I have no idea what is causing this or how do I fix this?
I am using Scss for this project. Please see code & Screenshots below.
<!-- CSS -->
<link rel="stylesheet" href="css/main.css" />
<!-- MOBILE CSS -->
<link rel="stylesheet" media="screen and (max-width: 768px)" href="css/mobile.css">
<!-- Header -->
<!-- <div id="header-home"> -->
<div id="header-home">
<!-- <div id="particles-js"></div> -->
<div class="container">
<!-- NAVBAR START -->
<nav id="main-nav">
<img src="img/logo-white-1.svg" alt="My Portfolio Logo" id="logo" />
<!-- <i class="material-icons" id="mobile-menu">menu</i> -->
<!-- DROP DOWN MENU - START -->
<div class="menu-dropdown">
<div class="col">
<div class="con">
<div class="bar top"></div>
<div class="bar middle"></div>
<div class="bar bottom"></div>
</div>
</div>
<div class="menu-content hidden">
<ul>
<li>Home</li>
<li>About Me</li>
<li>Capabilities</li>
<li>Skills</li>
<li>Portfolio</li>
<li>Contact Me</li>
</ul>
</div>
</div>
<!-- DROP DOWN MENU - END -->
<ul class="nav-links">
<li>Home</li>
<li>About Me</li>
<li>Capabilities</li>
<li>Skills</li>
<li>Portfolio</li>
<li>Contact Me</li>
</ul>
</nav>
<!-- NAVBAR END -->
<div class="header-content">
<h1>DESIGNER</h1>
<h1>+</h1>
<h1>DEVELOPER</h1>
<p class="lead">
Welcome to my website. I am a Graphic / Web Designer & Web Developer
</p>
</div>
</div>
<div id="particles-js"></div>
<img
src="img/bottom-curve.svg"
class="bottom-curve"
alt="bottom-header-curve"
/>
</div>
<!-- </div> -->
<!-- ABOUT ME -->
<div id="about-me">
<div class="container">
<div class="content-info">
<h1 class="section-title">About Me</h1>
<p class="lead">
Hello my name is Ruben Esquivel and my dad was a graphic designer so
I grew up playing with photoshop since I was a kid. For 10 years I
worked as a remote graphic designer / web master running entire
graphics department by myself providing mockups for getting sales
and turning the mockups into print ready graphics to be printed. I
am an expert in taking directions through phone or email and multi
tasking multiple projects at once to meet the deadline. I can handle
being under pressure and I am a master of hot keys so I can work
fast when needed. After working in the industry for 10 years I felt
like I knew everything when it came to graphic design so I decided
to learn web development because I love learning new things. I love
coding and I love taking my web designs and creating beautiful eye
catchy websites. To be honest I love both graphic design and coding,
being able to take an idea and turn into a design or website is like
creating magic for me.
</p>
<div class="social-icons">
</div>
</div>
<div class="profile-pic">
<img
class="p-2"
src="img/ruben-profile-pic_01.png"
alt="Ruben Profile Photo"
class="ruben-profile-photo"
/>
</div>
</div>
</div>
SCSS
// #header
#header-home {
height: 100vh;
margin: 0;
background: $dark-blue;
z-index: 1;
// position: relative;
// background-image: image("/dist/img/Ellipse 1.svg");
.bottom-curve {
position: absolute;
bottom: -40px;
width: 100%;
}
#particles-js {
position: absolute;
width: 100%;
height: 100%;
// background: $dark-blue;
top: 0;
z-index: 0;
}
.container {
// z-index: 2;
.header-content {
display: flex;
flex-direction: column;
text-align: center;
justify-content: center;
align-items: center;
height: 100%;
// padding: 0 2rem;
position: absolute;
color: white;
text-align: center;
// padding-top: 20%;
left: 0;
right: 0;
bottom: 0;
h1 {
font-size: 125px;
line-height: 0.9;
font-family: "Abril Fatface", cursive;
// text-shadow: 0 0 10px #fff ;
text-shadow: 0 0 40px rgba(255, 255, 255, 0.75);
// text-shadow: 0 0 5px #fff, 0 0 15px;
// #fff, 0 0 20px #fff, 0 0 25px #fff, 0 0 30px #fff, 0 0 35px #fff;
margin-bottom: 0.75rem;
}
}
}
}
// About Me
#about-me {
margin-top: -3rem;
position: relative;
margin-bottom: 5rem;
.container {
display: flex;
overflow: visible;
.content-info {
flex: 2;
// social icons
.social-icons {
font-size: 3rem;
a {
padding-right: 1rem;
transition: color 0.5s;
}
a:hover {
color: $yellow-color;
// transition-delay: 0.25s;
}
}
h1 {
color: $light-blue;
}
}
.profile-pic {
flex: 1;
margin-top: -5rem;
}
}
}
MOBILE MEDIA QUERIES CODE
#header-home {
margin-bottom: 7rem;
.container {
.header-content {
h1 {
font-size: 110px;
}
.lead {
width: 80%;
}
}
}
}
#about-me {
// margin-bottom: 0rem;
}
#capabilities {
margin-bottom: 2rem;
}
#skills .skills-container .skills-section .skills-list .dot:after {
width: 150px;
}
// PORTFOLIO IMAGES
#portfolio-section {
.lightbox img {
width: 80%;
max-width: 800px;
height: auto;
margin-top: 20%;
}
}
/* Smartphones */
#media (max-width: 500px) {
// MOBILE START
#header-home {
.container .header-content h1 {
font-size: 50px;
}
.bottom-curve {
bottom: -10px;
}
}
// ABOUT ME
#about-me .container .profile-pic img {
width: 80%;
}
// CAPABILITIES
#capabilities {
margin-bottom: 1rem;
}
My Phone iphone 8 Plus Screenshots.

Why won't the div resize?

I am working on a flip card for my personal portfolio. I have my divs set to a certain size and I want two in a row, but they won't go to the size I have set and four go in a row instead of the two I want. Here is the all of my code:
/* Whole Page */
body {
margin: 0;
text-align: center;
}
/* Nav */
nav {
display: block;
position: fixed;
background-color: black;
color: white;
width: 100%;
height: 10vh;
border-bottom: solid white 1px;
}
.btns {
display: inline-block;
float: right;
margin-top: -3.25%;
font-family: sans-serif;
width: 30vw;
}
button {
background-color: black;
border: none;
color: white;
display: inline-block;
float: right;
margin-right: 1%;
margin-left: 1%;
font-size: 22px;
cursor: pointer;
}
#logo {
margin-left: 3.5%;
text-align: left;
}
/* Welcome Section */
#welcome-section {
background-image: url(https://www.walldevil.com/wallpapers/a51/2755-city-cityscape-wallpaper-architecture-wallpapers-albums-skylines.jpg);
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
border-bottom: black 3px solid;
}
h1,
#welcome-section p {
width: 50%;
color: white;
text-align: left;
margin: auto;
font-weight: 800;
}
h1 {
font-size: 60px;
padding-top: 25vh;
font-family: sans-serif;
}
#welcome-section p {
font-size: 27px;
font-family: serif;
}
/* Portfolio */
#projects {
width: 55vw;
margin: auto;
}
#projects-h2 {
font-size: 30px;
text-decoration: underline;
}
.flip-card {
width: 25vw;
height: 25vh;
margin: auto;
position: relative;
perspective: 100vw;
float: left;
}
#media (min-width: 600px) and (max-width: 992px) {
.flip-card {
width: 31%;
margin: 1.16%;
}
}
#media (min-width: 992px) {
.flip-card {
width: 23%;
margin: 1%;
}
}
.flip-card .front,
.flip-card .back {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
background-size: cover;
transition: 0.3s;
backface-visibility: hidden;
/* Change Colors! */
border: solid 1px #333;
box-shadow: 5px 10px 8px #333;
}
.flip-card:hover .front {
transform: rotateY(180deg) scale(0.5);
}
.flip-card .back {
/* Change Colors! */
background: #333;
color: #FFF;
display: flex;
justify-content: center;
transform: rotateY(180deg) scale(0.5);
}
.flip-card:hover .back {
transform: rotateY(360deg) scale(1);
}
.flip-card .front {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
/* Contact */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link rel="stylesheet" href="main.css">
<!-- FreeCodeCamp Tests -->
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<title>Jacob Pieczynski | Front-end Web Developer</title>
</head>
<body>
<!-- Nav -->
<nav id="navbar">
<h2 id="logo">Jacob Pieczynski</h2>
<div class="btns">
<button>Home</button>
<button>Projects</button>
<button>Contact</button>
</div>
</nav>
<!-- Welcome Section -->
<section id="welcome-section">
<h1>I am Jacob Pieczynski</h1>
<p class="h1-desc">An up and coming teen web developer</p>
</section>
<!-- Projects -->
<section id="projects">
<h2 id="projects-h2">Projects</h2>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
<!-- New Card -->
<div class="flip-card">
<!-- Front -->
<div class="front" style="background-image:url(https://i.imgur.com/ZmJVBHn.png)">
</div>
<!-- Back -->
<div class="back">
<h2 class="card-header">Loren Impus</h2>
</div>
</div>
</section>
<!-- Contact -->
<section id="contact">
<!-- Contact Circle - Instagram -->
<a href="#" id="contact-a">
</a>
<!-- Contact Circle - Email -->
<a href="#" id="contact-a">
</a>
<!-- Contact Circle - FreeCodeCamp -->
<a href="#" id="contact-a">
</a>
<!-- Contact Circle - Github -->
<a href="#" id="contact-a">
</a>
</section>
<!-- Footer -->
<footer id="footer">
</footer>
</body>
</html>
Thanks for the help as this is a major project for me that I am very frustrated with at this point. Have a great day!
It looks like that is happening because you are overriding the width you set with the media queries like for example you have this:
.flip-card {
width: 25vw;
height: 25vh;
margin: auto;
position: relative;
perspective: 100vw;
float: left;
}
Then you have this:
#media (min-width: 600px) and (max-width: 992px) {
.flip-card {
width: 31%;
margin: 1.16%;
}
}
#media (min-width: 992px) {
.flip-card {
width: 23%;
margin: 1%;
}
}
Each of the widths in those media queries are overriding your 25vw, if you remove the width percentages out of each of those media queries or change the width:23% to 48% your cards will go into 2 to each row. The width 23% is telling them to be 23% percentage of the container width which is approximately 1/4 of the width which would cause them to be 4 in a row.

Bootstrap thumbnail images ignore centering css

I cannot center my bootstrap thumbnail images no matter what I try on tablet size and smaller. Once thumbnails reach thoses sizes they no longer scroll to stay center of screen. I have tried everything I can think of from adding center block to both my thumbnail class's and my img responsive class's HTML to text-algin center and margin auto 0. Nothing changes.
Here is my html
<div class="portfolio">
<div class="container">
<a name="porty"></a>
<h1 class="text-center" id = "port">My Work</h1>
<div class="row">
<div class="col-md-4">
<div class="thumbnail ">
<div class="caption">
<h4 class="text-center">A Berine Sanders Tribute page made with HTML,CSS, and Bootstrap</h4> <i class="fa fa-codepen fa-5x fa-fw" id="first"></i>
</div>
<img src="http://goodedevelopment.com/images/Bernie.PNG" class="img-responsive center-block" alt="tribute">
</div>
<legend>Tribute page</legend>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class="caption">
<h4 class="text-center">Google mockup page made with HTML,CSS,and Bootstrap</h4>
<i class="fa fa-codepen fa-5x fa-fw" id ="second"></i>
</div>
<img src="http://goodedevelopment.com/images/google.png" class="img-resposive center-block" alt="google">
</div>
<legend>Google homepage</legend>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class="caption">
<h4 class="text-center">A cannon game made with HTML,CSS, and Javascript</h4>
<i class="fa fa-codepen fa-5x fa-fw" id ="icon"></i>
</div>
<img src="http://goodedevelopment.com/images/cannon.png" class="img-responsive center-block" alt="cannon">
</div>
<legend>Cannon game</legend>
</div>
</div>
Here is my CSS
/*Portfolio*/
.portfolio {
background-color:#706C61;
padding-top: 50px;
padding-bottom: 100px;
display: inline-block;
width: 100%;
height: 800px;
position:relative;
}
.portfolio h1 {
font-size: 65px;
font-family: "Roboto",serif !important;
color: #0d0d0d !important;
}
.row {
padding-top: 100px;
}
.thumbnail {
height: 250px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
border: 1px solid black !important;
border-radius: 5px !important;
}
.caption img {
flex-shrink: 0;
max-width 100%;
max-height: 100%;
}
.caption {
position: absolute;
top: 0;
right: 0;
background: rgba(128, 128, 128, 0.75);
width: 100%;
height: 100%;
padding: 2%;
display: none;
text-align: center;
color: #fff !important;
z-index: 2;
font-family: "Montserrat",serif !important;
}
.caption a {
text-decoration: none;
color: white;
}
.caption h4 {
position: relative;
left: 5px;
bottom: 10px;
font-size: 25px;
}
.caption i:hover {
color: orange !important;
}
legend {
font-family: "Roboto",serif !important;
border-bottom: none !important;
color: #0d0d0d !important;
font-size:22px; !important;
height:200px;
}
#first {
position: relative !important;
bottom: -35px !important;
}
#second {
position: relative !important;
bottom: -35px !important;
}
#icon {
position: relative;
top: 30px;
}
#media screen and (min-width:767px) and (max-width:1199px) {
#first {
position: relative;
bottom: 20px;
}
#icon {
top: 50px !important;
}
.caption h4 {
font-size: 20px;
}
}
#media screen and (min-width:767px) and (max-width:991px) {
#first {
position: relative;
top: 50px;
}
.caption h4 {
font-size: 30px;
}
.caption {
font-size: 15px;
}
.caption i {
position: relative;
top: 50px;
}
#icon {
position: relative;
top: 65px !important;
}
.caption .fa {
font-size: 50px;
}
}
#media screen and (max-width: 1200px) {
.portfolio h1 {
font-size: 55px;
}
}
#media screen and (max-width: 991px){
.thumbnail {
height: 369px;
width: 440px;
position: relative;
right: -142px;
bottom: 48px;
}
.portfolio{
height: 2650px;
}
#profile li {
position: relative;
left: 60px;
}
.caption h4 {
font-size: px !important;
}
.caption .fa {
font-size: 80px !important;
}
legend {
height: 80px;
position: relative;
left: 139px;
bottom: 53px;
}
}
#media screen and (max-width: 965px) {
.portfolio {
margin-top: -150px !important;
}
}
#media screen and (max-width:767px) {
#first {
position: relative;
top: 25px;
}
.caption h4 {
font-size: 30px;
}
.caption {
font-size: 15px;
}
#port{
width: 50%;
height: 50%;
overflow: auto;
margin: auto;
position: absolute;
top: -1285px;
left: 0;
bottom: 0;
right: 0;
}
.thumbnail {
position: relative;
bottom: 0px;
}
legend
{
position: relative;
bottom: 13px;
}
}
#media screen and (max-width: 454px){
.caption h4{
font-size:25px;
}
#first{
top:15px;
}
#second{
top:15px;
}
}
#media screen and (max-width:400px) {
#icon {
position: relative;
bottom: 20px;
}
}
#media screen and (max-width:397px) {
#icon {
position: relative;
top: 0px;
}
}
#media screen and (max-width:390px) {
#first{
top:5px;
}
}
#media screen and (max-width:325px) {
.caption .fa {
font-size:60px;
}
}
#media screen and (max-width:307px) {
#first{
top:-5px;
}
}
/*End Portfolio*/
Here is the website
And finally here is a screenshot of what I am experiencing any help would be greatly appreciated thanks!
Instead of just using class="col-md-4" you should include "instructions" for Bootstrap at different screen sizes. Using multiple classes like class="col-xs-12 col-sm-6 col-md-4" would adjust the number of columns at the various screen sizes, making it easy to center the contents of each column, and just use the "img-responsive" class on the images so they will always fit in the column they are in. Then when the screen size is smaller, fewer columns will be displayed but the content of the column remains the same and stays centered in the column. If you want to center the column on the screen without filling the width of the screen (like to use col-xs-10 so it doesn't fill the width of 12 col's) then use the col-x-offset-x class to create a "blank" column to the left of where your div will display. You can use combinations of screen sizes and offsets as needed. The grid makes it really easy to get the alignment you want at different sizes without having to use CSS to define exact pixels for margins and whatnot. Once you start overwriting the CSS with "other instructions" as far as height/width go, things can get goofy...
Your fixed-navbar are with a width bigger than lower resolutions, theres alot of blank space on the right when you drop the resolution. I recommend you start developing your website following this basic bootstrap responsible template.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Bare - Start Bootstrap Template</title>
<!-- Custom CSS -->
<link data-require="bootstrap-css#3.2.0" data-semver="3.2.0" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<script data-require="jquery#*" data-semver="3.0.0" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<style>
body {
padding-top: 70px;
/* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
}
</style>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Start Bootstrap</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
About
</li>
<li>
Services
</li>
<li>
Contact
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h1>A Bootstrap Starter Template</h1>
<p class="lead">Complete with pre-defined file paths that you won't have to change!!</p>
<ul class="list-unstyled">
<li>Bootstrap v3.3.7</li>
<li>jQuery v1.11.1</li>
</ul>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</body>
</html>
Rebase your website inside the .container and link your style and keep going.. I hope it helps you to understand better the concepts of bootstrap, i cannot do the whole job for you after all you are a full stack developer.