Skip to content

Instantly share code, notes, and snippets.

@anilkk
Created July 2, 2019 05:06
Show Gist options
  • Select an option

  • Save anilkk/4976d0f278fe32790341c0fe5d295a57 to your computer and use it in GitHub Desktop.

Select an option

Save anilkk/4976d0f278fe32790341c0fe5d295a57 to your computer and use it in GitHub Desktop.
style with responsive styling
/*
Colours used:
Primary Colour (pink): #FFECE8;
Secondary Colour (brown): #BF491F; #FFA282; #FFE4DA;
Font: #212121; #ffffff; #9E9E9E;
*/
* {
box-sizing: border-box;
}
body {
background-color: #ffffff;
font-family: 'Montserrat', sans-serif;
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
line-height: 1.6;
color: #212121;
}
header {
background-color: #ffffff;
padding: 10px 0 4px;
box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
position: fixed;
width: 100%;
display: inline-block;
}
main {
padding-top: 72px;
}
footer {
background-color: #FFECE8;
padding: 10px;
text-align: center;
}
h1 {
font-size: 2.25em;
line-height: 1.4;
}
h2 {
font-size: 2em;
letter-spacing: 4px;
text-align: center;
margin: 20px auto;
}
h3 {
font-size: 1.75em;
font-weight: 500;
margin: 40px auto 10px auto;
}
h4 {
font-size: 1.35em;
}
h5 {
font-size: 0.75em;
color: #9E9E9E;
text-align: center;
}
img {
width: 100%;
}
/* ========== Link ========== */
a {
color: #BF491F;
text-decoration: none; /* No underlining */
}
a:hover,
a:focus {
color: #FFA282;
text-decoration: underline; /* Underlining when hovering over a link */
}
a:active {
color: #BF491F;
text-decoration: none; /* No underlining */
}
/* ========== Buttons ========== */
.button {
display: inline-block;
background-color: #ffffff;
color: #212121;
text-transform: uppercase;
font-weight: 500;
font-size: 0.75em;
letter-spacing: 3px;
margin: 20px auto;
padding: 10px 20px;
border: 2px solid #BF491F;
transition: 0.2s;
transition-property: opacity;
}
.button:hover {
opacity: 0.8; /* Reduces the opacity of the button to 80% */
background-color: #FFA282;
color: #212121;
transition: 0.2s;
text-decoration: none;
}
.button:active {
color: #9E9E9E;
text-decoration: none;
}
.button.contact {
background-color: #BF491F;
color: #ffffff;
}
.button.contact:active {
background-color: #BF491F;
color: #ffffff;
}
#portfolio .button {
margin: 10px auto;
}
/* ========== Formatting ========== */
.container {
margin: 0 auto;
padding: 0 15px;
max-width: 1200px;
}
.center {
text-align: center;
}
.row {
margin: 25px 0;
}
.new-section {
margin-top: 30px;
}
/* ========== Hero section ========== */
#hero {
background-color: #ffffff;
display: inline-block;
width: 100%;
}
#hero h1 {
text-align: center;
}
/* ========== ABOUT page ========== */
.mystory-section {
display: inline-block;
color: #BF491F;
font-weight: 500;
margin: 20px auto 10px auto;
}
#about-me {
padding: 10px 0;
display: inline-block;
width: 100%;
}
#skills h3 {
border-bottom: 2px solid #212121;
width: 250px;
}
#tools h3 {
border-bottom: 2px solid #212121;
width: 250px;
}
#profile-picture {
display: inline-block;
width: 60%;
margin: 0 auto;
}
#skills > ul {
list-style-type: none;
padding: 0;
}
/* ========== Header / Navigation menu ========== */
.logo {
width: 10%;
max-width: 150px;
min-width: 100px;
}
nav > ul {
list-style-type: none;
padding: 0;
margin: 0;
}
nav > ul > li > a {
padding: 0 15px;
text-transform: uppercase;
color: #212121;
}
nav > ul > li > a:hover, :focus {
color: #212121;
text-decoration: none;
}
nav > ul > li > a:active {
border-bottom: 2px solid #BF491F;
transition: 0.2s opacity;
}
.navtoggle li:not(:last-child) {
display: none;
}
.navtoggle, .navtoggle.responsive {
position: relative;
}
.navtoggle li .icon {
position: absolute;
right: 0;
top: 2px;
font-size: 30px;
}
.current-page {
font-weight: 500;
}
.non-current-page {
color: #9E9E9E;
}
/* ========== Footer ========== */
#contact h2{
text-align: left;
letter-spacing: 2px;
}
#contact {
text-align: left;
}
.social-media > ul {
list-style-type: none;
padding: 0;
text-align: right;
}
.social-media > ul > li {
display: inline-block;
}
/* ========== Animation ========== */
@keyframes color-change-sky {
from {fill: #CEEDFB;}
to {fill: #372CC3;}
}
#Sky {
animation: 15s color-change-sky infinite alternate linear;
}
@keyframes color-change-seagull {
from {opacity: 1}
to {opacity: 0}
}
#Seagull {
animation: 15s color-change-seagull infinite alternate linear;
}
@keyframes color-change-night {
from {opacity: 0}
to {opacity: 1}
}
#Star {
animation: 15s color-change-night infinite alternate linear;
}
.Moon {
animation: 15s color-change-night infinite alternate linear;
}
/* ========== INK TANK page ========== */
.inktank-process {
color: #00796B;
}
/* ANIL STYLE starts here */
@media only screen and (max-width: 640px) {
.navtoggle.responsive nav {
padding: 24px 0 0;
}
.navtoggle.responsive li {
display: block;
padding: 10px 0;
}
.navtoggle.responsive li:last-child {
padding: 0 0 10px;
}
}
/* ANIL STYLE starts end */
/* ==============================
Medium devices (640px and larger)
================================= */
@media only screen and (min-width: 640px) {
body {
font-size: 18px;
}
header {
text-align: unset;
padding: 20px 0 13px;
font-size: 16px;
}
nav {
width: auto;
float: right;
}
nav > ul {
margin: 1em 0;
}
nav > ul > li {
display: inline-block;
}
.navtoggle li:not(:last-child) {
display: inline-block;
}
.navtoggle li:last-child {
display: none;
}
main {
padding-top: 99px;
}
#hero {
padding-top: 0;
}
#hero span {
display: block;
}
#contact span {
display: block;
}
.col-md-1 {
width: 8.33%;
}
.col-md-2 {
width: 16.66%;
}
.col-md-3 {
width: 25%;
}
.col-md-4 {
width: 33.33%;
}
.col-md-5 {
width: 41.66%;
}
.col-md-6 {
width: 50%;
}
.col-md-7 {
width: 58.33%;
}
.col-md-8 {
width: 66.66%;
}
.col-md-9 {
width: 75%;
}
.col-md-10 {
width: 83.33%;
}
.col-md-11 {
width: 91.66%;
}
.col-md-12 {
width: 100%;
}
[class*="col-"] {
float: left;
padding: 0 10px;
}
.row::after {
content: "";
clear: both;
display: table;
}
.width-80 {
width: 80%;
margin: 0 auto;
}
#inktank-intro h4 {
margin: 15px 0;
}
/* ==============================
Large devices (1024px or larger)
================================= */
@media only screen and (min-width: 1024px) {
.col-lg-5 {
width: 41.66%;
}
.col-lg-7 {
width: 58.33%;
}
}
/* ==============================
X-large devices (1440px or larger)
================================= */
@media only screen and (min-width: 1440px) {
.container {
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment