This is my css code.
nav.navbar {
color: white !important;
background-color: #d82c2e;
font-weight: bold;
}
html {
margin-right: 70px !important;
}
.introSec {
height: 750px;
}
.hr {
width: 100px;
border-top: 1px solid red;
}
.navbar-flat li a:focus,
.navbar-flat li a:hover,
.navbar-flat li.active a,
.navbar-brand {
background-color: #c12728;
color: #fff;
}
.navbar-flat a {
transition: all .3s ease-in, 1s;
}
nav.navbar {
padding-left: 35%;
}
.nav-link {
color: #fff;
/*font-size:calc(15px + 0.6vw);*/
}
.navbar-brand {
color: white;
}
.introLine {
text-align: center;
padding-top: 30px;
font-size: calc(15px + 0.6vw);
}
.pieImage {
border-radius: 100%;
margin: 40px 45%;
height: calc(20% + 0.6vw);
min-width: calc(13% + 0.6vw);
}
.pieImage2 {
border-radius: 100%;
margin-top: 20px;
width: 300px !important;
height: 600;
display: inline-block;
}
.coolOne {
margin-left: 17%;
}
#landing-header {
margin-top: -80px;
}
.myName {
text-align: center;
color: white;
font-family: Lato, sans-serif;
letter-spacing: -2px;
}
.title {
text-align: center;
color: black;
word-spacing: 3px;
padding: 10px;
margin: 15px auto;
font-family: 'Pontano Sans', sans-serif;
font-size: calc(30px + 0.6vw);
}
.firstSec {
background-color: #d82c2e;
height: 725px;
}
.aboutTitle {
text-align: center;
color: #d82c2e;
font-family: Lato, sans-serif;
font-weight: 700;
font-size: 30px;
}
.firstSec {
margin-top: 57px;
}
.aboutIntro {
text-align: center;
font-family: Lato, sans-serif;
}
.aboutMe {
padding: 20px 90px 0 90px;
}
.activities-inner {
padding-top: 50px;
margin: 50px;
width: 100%;
}
.activities {
border: 1px solid #e3e5e5;
display: inline;
padding: 50px;
}
.column {
float: left;
width: 25%;
border: 1px solid lightgray;
height: 200px;
text-align: center;
}
.row:after {
content: "";
display: table;
clear: both;
}
.column {
font-weight: 500;
font-size: 30px;
padding-top: 30px;
}
.icon {
font-size: 40px;
color: #d82c2e;
}
.technicalSkills {
text-align: center;
font-family: Lato, sans-serif;
}
.thirdSec {
background-color: #d82c2e;
}
.technicalSkills {
margin-top: 50px;
color: white;
padding-top: 20px;
}
.portfolioHeading {
text-align: center;
color: #d82c2e;
font-weight: 700;
font-family: 700;
font-size: 30px;
}
.hr {
margin-top: 20px;
color: #d82c2e;
}
.portfolioPic {
margin: 20px 35%;
width: 30%;
}
.text-center {
display: flex;
flex-wrap: wrap;
}
.lastHr {
float: left;
}
.contact {
text-align: center;
}
.lastSec {
background-color: #d82c2e;
margin-top: 20px;
}
.contactDetails {
padding-top: 20px;
}
.white {
color: white;
}
.space {
padding-top: 5px;
}
.row {
padding-left: 100px;
padding-right: 130px;
}
.dev {
font-size: calc(18px + 1.0vw);
}
.secondDev {
font-size: calc(15px + 0.6vw);
}
#landing-header {
z-index: 1;
position: relative;
text-align: center;
padding-top: 40vh;
}
#landing-header h1 {
color: #fff;
}
.slideshow {
position: inherit;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0;
list-style: none;
margin: 0;
margin-top: -23.1%;
padding: 0;
}
.slideshow li {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-size: cover;
background-position: 50% 50%;
background-repeat: no-repeat;
opacity: 0;
z-index: 0;
animation: imageAnimation 50s linear infinite;
}
.slideshow li:nth-child(1) {
background-image: url(https://bearlake.org/wp-
content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg)
}
.slideshow li:nth-child(2) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 10s;
}
.slideshow li:nth-child(3) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 20s;
}
.slideshow li:nth-child(4) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 30s;
}
.slideshow li:nth-child(5) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 40s;
}
#keyframes imageAnimation {
0% {
opacity: 0;
animation-timing-function: ease-in;
}
10% {
opacity: 1;
animation-timing-function: ease-out;
}
20% {
opacity: 1
}
30% {
opacity: 0
}
}
.no-cssanimations .slideshow li {
opacity: 1;
}
.nav-link {
color: white !important;
}
.navbar-toggler {
border-color: white;
/*margin-left: -50%;*/
}
.navbar-fixed-top {
top: 0;
}
.navbar-light .navbar-toggler {
border-color: transparent !important;
}
<div class="row">
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-code"> </i> </p>
<h3 class="dev"> DEVELOPMENT </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-music"></i>
</p>
<h3 class="dev"> MUSIC </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-basketball-ball"></i>
</p>
<h3 class="dev"> TENNIS </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-book"></i>
</p>
<h3 class="dev"> BOOKS </h3>
</div>
</div>
</div>
<div id="scrollToThird">
</section>
<!-- Third Sec Starts here -->
<section class="thirdSec">
<h2 class="technicalSkills"> TECHNICAL SKILLS </h2>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol id="scrollToFourth" class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active coolOne">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./htmlPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./cssPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./javascriptPercent2.jpg">
</div>
<div class="carousel-item coolOne">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./nodejsPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./expressPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./javascriptPercent2.jpg">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
</div>
<section class="fourthSec">
<hr class="hr">
<h2 class="portfolioHeading"> PORTFOLIO </h2>
<div class="container">
<div class="row text-center" style="display:flex; flex-wrap: wrap;">
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-lit-mesa-98519-herokuapp-1518954523255.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Yelp Camp</h4>
</div>
Check it out!
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-dry-castle-83141-herokuapp-blogs-1519047247719.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Blog Site</h4>
</div>
Check it out!
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-whispering-hamlet-69416-herokuapp-results-1519112901364.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Seach Any Movie</h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3717.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> 101 WeirdFunFacts </h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3718.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Flash Card</h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3719.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Algebraic Equations </h4>
</div>
Check it out!
<div id="scrollToFifth">
</div>
</div>
</div>
</div>
</div>
</section>
<section class="lastSec">
<h2 class="contactDetails"> CONTACT DETAILS </h2>
<hr class="col-lg-4 col-md-4 col-sm-4 col-xs-2 lastHr">
<br>
<br>
<div class="contact">
<h5 class="white"> Email: </h5>
<p> —————————————— </p>
<h5 class="white"> Contact Number: </h5>
<p> ——————————— </p>
<h5 class="white"> Address: </h5>
<p> ———————————— </p>
</div>
</section>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<% include partials/footer %>
<% include partials/header %>
<section class="introSec">
<!--<div id="landing-header">-->
<div id="landing-header">
<h1>Hi, I am Neymat Kakar</h1>
<h4> Web/IOS Developer In Dubai </h4>
</div>
<ul class="slideshow">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</section>
<div id="scrollTo">
<section class="firstSec">
<nav class="navbar navbar-expand-lg navbar-flat navbar-light">
<!--<a class="navbar-brand" href="#srcollTo">HOME </a>-->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#scrollTo">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToSec">ABOUT</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToThird">SKILLS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToFourth">PORTFOLIO</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToFifth">CONTACT</a>
</li>
</ul>
</div>
</nav>
<img class="pieImage" src="./IMG_8224.jpg">
<h1 class="myName"> NEYMAT KAKAR </h1>
<h3 class="introLine"> CREATIVE - PROFESSIONAL - PASSIONATE</h3>
<h5 class="col-lg-12 col-md-12 col-sm-12 col-xs-12 title"> WEB/IOS APP DEVELOPER</h5>
<div id="scrollToSec">
</section>
</div>
<!-- Second Section Starts Below -->
<section class="secSec">
<hr class="hr">
<h3 class="aboutTitle"> HERE'S WHAT I'M DOING </h3>
<!--<p class = "aboutIntro"> I introduce the most creative and original ideas for my company </p>-->
<p class="aboutMe"> “I am a simple person with great passion for web development. I have been in the field now for quite some time, and have been loving every minute of it. I am also a part-time blogger and avid reader of non-fiction and overall thinker. I also enjoy
going out to local meetups, events and descent clubs to interact with people from various walks of life.” </p>
Please go through the image. This is how my page looks like.
Notice from navbar section, the margin on the right is way out. I need all the sections to have the same margin and the page not to overflow.
I think problem with your html and body margin. Remove margin-right to your html to tag.
Try to set below css
html,body {
width: 100%;
height: 100%;
margin: 0;
padding:0;
overflow-x:hidden;
}
Inside the html if you're using bootstrap go-through about bootstrap container class to get left and right space.
Related
I'm trying to add margin-top to the footer but it's not working, any ideas why?
body {
font-family: "Heebo", sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #000000;
font-family: Heebo, sans-serif;
}
span,
p {
color: #000000;
font-family: "Heebo", sans-serif;
font-size: 18px;
letter-spacing: 0.54px;
line-height: 30px;
}
a {
color: inherit;
font-family: "Heebo", sans-serif;
font-size: 18px;
text-decoration: none;
}
/*
* Padding X axis
*/
.px-100 {
padding-right: 100px;
padding-left: 100px;
}
.px-200 {
padding-right: 200px;
padding-left: 200px;
}
/*
* Padding Y axis
*/
.py-100 {
padding-top: 100px;
padding-bottom: 100px;
}
/*
* Header
*/
#header {
position: relative;
z-index: 1000;
background-color: #f1eeea;
}
#header .container-fluid .row {
height: 100px;
}
.language-switcher,
#menu > .menu {
list-style-type: none;
margin: 0;
padding: 0;
}
#menu > .menu {
margin-right: 65px;
}
#menu > .menu li {
font-size: 20px;
}
#menu > .menu li:not(:last-child) {
margin-right: 45px;
}
.language-switcher {
margin-right: 30px;
}
.language-switcher li {
color: #2e2e2e;
font-size: 20px;
}
.language-switcher li:not(:last-child) {
margin-left: 5px;
}
.language-switcher li:not(:last-child)::before {
content: "/";
}
.social-icons {
list-style-type: none;
margin: 0;
padding: 0;
}
.social-icons a:not(:last-child) {
margin-right: 15px;
}
/*
* Footer
*/
#footer {
background-color: #2e2e2e;
}
#footer p {
color: white;
font-size: 20px;
letter-spacing: 0;
line-height: 30px;
}
#footer p.credit {
color: white;
font-size: 25px;
letter-spacing: 0;
line-height: 30px;
}
#footer-bottom {
border-top: 1px solid #ececec;
}
#footer-bottom a,
#footer-bottom p {
color: white;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css" integrity="sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<header id="header" role="banner">
<div class="container-fluid">
<div class="row align-items-center px-100">
<div class="col d-flex align-items-center justify-content-start">
<nav id="menu" class="" role="navigation" itemscope="" itemtype="https://schema.org/SiteNavigationElement">
<ul id="menu-%d7%aa%d7%a4%d7%a8%d7%99%d7%98-%d7%a8%d7%90%d7%a9%d7%99" class="menu d-flex align-items-center">
<li id="menu-item-68" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-68"><span itemprop="name">Item 2</span></li>
<li id="menu-item-69" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-69"><span itemprop="name">Item 1</span></li>
</ul>
</nav>
<img src="/wp-content/uploads/2022/06/icon-search.svg" id="open-search" alt="Search" data-bs-toggle="modal" data-bs-target="#popup-search">
</div>
<div class="col col-lg-2">
<div class="site-logo text-center">
<img width="113" height="60" src="/wp-content/uploads/2022/06/logo.png" class="custom-logo" alt="Logo">
</div>
</div>
<div class="col d-flex justify-content-end">
<ul class="language-switcher d-flex flex-row-reverse align-items-center">
<li class="lang-item lang-item-3 lang-item-en lang-item-first">
English
</li>
<li class="lang-item lang-item-6 lang-item-he current-lang">
עברית
</li>
</ul>
<ul class="social-icons d-flex align-items-center">
<a href="https://www.facebook.com/" target="_blank">
<img src="/wp-content/uploads/2022/06/icon-facebook.svg" alt="">
</a>
<a href="https://www.youtube.com/" target="_blank">
<img src="/wp-content/uploads/2022/06/icon-youtube.svg" alt="">
</a>
</ul>
</div>
</div>
</div>
</header>
<main>
Why is this text close to the footer if there is margin top on the footer?
</main>
<footer id="footer" class="mt-5">
<div class="container-fluid">
<div class="" id="footer-top">
<div class="row g-5 py-5">
<div class="col">
<div class="site-logo text-center">
<a href="https://example.com" class="custom-logo-link" rel="home" aria-current=" aria-current=" page""="">
<img src="/wp-content/uploads/2022/06/logo.png" alt="logo">
</a>
</div>
<p class="site-title text-center mb-0 mt-4"><strong>1</strong></p>
<p class="site-description text-center my-0">1</p>
</div>
<div class="col">
<p class="credit mb-0">1<br><strong>1</strong></p>
</div>
<div class="col">
<p class="mb-0"><strong>1:</strong> 1</p>
<p class="mb-0"><strong>2:</strong> 2</p>
</div>
<div class="col">
<p class="mb-0"><strong>1</strong></p>
<p class="mb-0"><strong>2:</strong> 2</p>
<p class="mb-0"><strong>3:</strong> 3</p>
</div>
<div class="col">
<p><strong>4:</strong></p>
<ul class="social-icons-list list-unstyled list-inline">
<li class="list-inline-item px-1">
<a href="https://www.facebook.com/" target="_blank">
<img src="/wp-content/uploads/2022/07/icon-facebook-white.svg" alt="">
</a>
</li>
<li class="list-inline-item px-1">
<a href="https://www.youtube.com/" target="_blank">
<img src="/wp-content/uploads/2022/07/icon-youtube-white.svg" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="" id="footer-bottom">
<div class="row py-4">
<div class="col">
<p class="text-center mb-0">1 1 | 2 2</p>
</div>
</div>
</div>
</div>
</footer>
Thanks!
IOS displays hero images really pixeladed and zoomed in, while other os and browsers other than safari are fine... help!
Not sure how to go about it... Can I fix it through css or just not have a hero slider in the site in order to keep the UX/UI up?
This is my html
<section id="hero">
<div class="container-fluid hero-container">
<div id="heroCarousel" class="carousel slide carousel-fade" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="5000" style="background-image: url(/assets/img/hero/clouds.jpg); background-position: center bottom">
<div class="carousel-container">
<div class="carousel-caption dark">
<div class="hero-content-container">
<div class="carousel-header animate__animated animate__fadeInDown">I am an explorer</div>
<div class="carousel-content animate__animated animate__fadeInUp animate__delay-1s">I love to explore and discover new skills, like a new programming language, or a new real language!</div>
</div>
</div>
</div>
</div>
<div class="carousel-item" data-bs-interval="5000" style="background-image: url(/assets/img/hero/buildings-bottom.jpg); background-position: center bottom">
<div class="carousel-container">
<div class="carousel-caption dark">
<div class="carousel-header animate__animated animate__fadeInDown">I am a problem solver</div>
<div class="carousel-content animate__animated animate__fadeInUp animate__delay-1s">From software and hardware to welding up a new design, I love solving problems that come along with creating</div>
</div>
</div>
</div>
<div class="carousel-item" data-bs-interval="5000" style="background-image: url(/assets/img/hero/printer-hero.jpg); background-position: center top">
<div class="carousel-container">
<div class="carousel-caption">
<div class="carousel-header animate__animated animate__fadeInDown">I love to create</div>
<div class="carousel-content animate__animated animate__fadeInUp animate__delay-1s">Designing and creating new and clever things has been a passion for me all my life</div>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#heroCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#heroCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
<div id="about"></div>
</section>
And this is the Css
.hero-container {
width: 100%;
height: 100vh;
padding: 0;
overflow: hidden;
margin-top: 0;
}
.carousel-container {
display: flex;
justify-content: center;
}
.carousel-item {
/* width: 100%; */
height: 100vh;
background-size: cover;
background-repeat: no-repeat;
/* position: relative; */
transition: 0.5s;
background-attachment: fixed;
}
.hero-content-container {
margin: 0;
}
.carousel-caption {
top: 50%;
transform: translateY(-50%);
margin: 0px;
padding: 0px;
}
.dark {
color: #313131;
}
.carousel-header {
font-family: "Oxygen", sans-serif;
font-size: 70px;
top: 50%;
transform: translateY(-50%);
margin-bottom: 0px;
}
.carousel-content {
font-family: "Oxygen", sans-serif;
font-size: 25px;
margin-top: 0px;
}
#media (max-width: 500px) {
.carousel-header {
font-size: 40px !important;
}
.carousel-content {
font-size: 15px !important;
}
}
#media (max-width: 800px) {
.carousel-header {
font-size: 55px;
}
.carousel-content {
font-size: 25px;
}
}
What it should look like
What it looks like on safari / IOS (apple)
I'm designing a card with a color background instead of image, after passing in mobile size (sm or xs) my rounded-circle background-color changes to an ellipsoid's one.
Here is what I want:
I would like to have the same design for xl-md-sm even for xs, I used #mediaquery to try to resolve this problem unfortunately it didn't work. so I want your help.
This is what I get:
Here is HTML markup:
<div class="container mt-5 mb-4 px-5">
<div class="card ">
<div class="row mt-5 w-100 hover-shadow ">
<div class="meq card-body bg-danger .d-sm-flex col-2 mt-0 mb-0 rounded-circle px-sm-0 ">
<h1 class="nowrap text-center text-light font-weight-bold px-sm-2 py-5">KKE</h1>
<a href="#!">
</a>
</div>
<div class="col-10 second_part">
<div class="card-text justify-content-center align-items-center">
<div class="card-body">
<a href="#" class="list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h3 class="mb-1 text-dark font-weight-bold">Kumbu<br> Kumbu<br>Ezechias</h3>
<small class="text-muted">
<ul class="list-group">
<li>
<div class="progress ">
<div class=" progress-bar bg-danger" role="progressbar" style="width: 100%;"
aria-valuenow="100" aria-valuemin="100" aria-valuemax="100"></div>
</div>
</li>
<li> Dear you won</li>
<li><small class="font-weight-bold align-content-center float-right">Mo 20224525</small>
</li>
</ul>
</small>
</div>
<p class="mb-1">
Xxxxx77
</p>
<p class="mb-1">
04:25
</p>
</a>
</div>
</div>
</div>
</div>
</div>
<!--/ card 1 -->
here is CSS
* {
margin: 0;
padding: 0;
initial-letter-align: center;
text-decoration: none;
box-sizing: border-box;
}
h1,
h3,
h6 {
text-transform: uppercase;
}
ul {
margin-left: -10px;
padding-left: -10px;
list-style: none;
}
h6 {
text-align: end;
margin-top: 70%;
margin-right: 37%;
}
.nowrap {
white-space: nowrap;
}
#media (max-width: 48em) {
h1,
h3 {
font-size: small;
font-weight: normal;
}
h1 {
margin-top: 0%;
text-align: center;
}
div .meq {
top: 50%;
text-align: center;
max-height: 10.1rem;
max-width: 10.1rem;
padding-left: 0.7rem;
padding-right: 1.9rem;
position: relative;
border-radius: 100%;
}
* {
margin: 0;
padding: 0;
initial-letter-align: center;
text-decoration: none;
box-sizing: border-box;
}
}
I think what's making the trouble is when you use classes .d-sm-flex and card-body that are making trouble.
Here is what I suggest you for your circle div
<div class="rounded-circle text-center" style="width: 10rem; height: 10rem; background: red;" >
<h1 class="nowrap text-center text-light font-weight-bold px-sm-2 py-5">KKE</h1>
<a href="#!">
</a>
</div>
So I was trying to implement flexbox into my container and it got messed up. I want the text to go beneath the circles, spaced and centered neatly and have it done via flexbox please. I am so lost in this code that I cannot figure this out, any help is greatly appreciated. It says I need t add more details but I can't think of any so this is just type.
.bottom__container {
background-color:rgba(255, 236, 0, 0.7);
text-align: center;
margin:0;
padding: 8px;
color: black;
font-family: 'Kalam', cursive;
font-weight: bolder;
font-size: 1.5rem;
}
.bottom__container li {
list-style: none;
display: inline-block;
padding: 32px;
}
.btm-container__why {
font-size:2.5rem;
margin:0;
}
.btm-container__depends {
font-size: small;
text-align: right;
font-family: initial;
}
.circle {
width: 128px;
height: 128px;
border: 2px solid #424242;
border-radius: 50%;
margin: auto;
background-color: white;
}
.icon {
margin-top: 20%;
}
<section class="btm-containers">
<section id="scroll" class="bottom__container">
<div>
<h1 class="btm-container__why">Why Choose Us?</h1>
<ul>
<li class="lists">
<div class="circle">
<div class="icon"><i class="fa fa-users fa-3x" aria-hidden="true"></i></div>
</div>
<p>Thousands of Clients</p>
</li>
<li class="lists">
<div class="circle">
<div class="icon"><i class="fa fa-handshake-o fa-3x" aria-hidden="true"></i></div>
</div>
<p>Online/In-person Consultations*</p>
</li>
<li class="lists">
<div class="circle">
<div class="icon"><i class="fas fa-directions fa-3x"></i></div>
</div>
<p>Guided Tours*</p>
</li>
<li>
<div class="circle">
<div class="icon"><i class="fa fa-building-o fa-3x" aria-hidden="true"></i></div>
</div>
<p>Affordable Rent!*</p>
</li>
</ul>
<p class="btm-container__depends">*Depends on service purchased.</p>
</div>
</section>
Is there a reason why you put "lists" as a class for both ul and li? and then in your CSS you also selected "lists li". Put another class or change it for one of them, and then you should be able to center it.
Try cleaning up your code first. You have various mistakes such as
<li class="lists">
<div class="circle">
<div class="icon"><i class="fas fa-directions fa-3x"></i></div>
<p>Guided Tours*</p>
</div>
</li class="lists">
<li>
and I think you'd have an easier time debugging if you had it organized.
The problem is with the class for both ul and li (lists) also with padding here is your desired result:
<section id="scroll" class="btm-container">
<div>
<h1 class="btm-container__why">Why Choose Us?</h1>
<ul class="lists">
<li class="list-item">
<div class="position-relative d-flex flex-column align-items-center justify-content-center">
<div class="circle icon"><i class="fa fa-users fa-3x" aria-hidden="true"></i></div>
<p>Thousands of Clients</p>
</div>
</li>
<li class="list-item">
<div class="position-relative d-flex flex-column align-items-center justify-content-center">
<div class="circle icon"><i class="fa fa-handshake-o fa-3x" aria-hidden="true"></i></div>
<p>Online/In-person Consultations*</p>
</div>
</li>
<li class="list-item">
<div class="position-relative d-flex flex-column align-items-center justify-content-center">
<div class="circle icon"><i class="fas fa-directions fa-3x"></i></div>
<p>Guided Tours*</p>
</div>
</li>
<li class="list-item">
<div class="position-relative d-flex flex-column align-items-center justify-content-center">
<div class="circle icon"><i class="fa fa-building-o fa-3x" aria-hidden="true"></i></div>
<p>Affordable Rent!*</p>
</div>
</li>
</ul>
<p class="btm-container__depends">*Depends on service purchased.</p>
</div>
</section>
and CSS
.btm-container {
background-color:rgba(255, 236, 0, 0.7);
text-align: center;
margin:0;
padding: 8px;
color: black;
font-family: 'Kalam', cursive;
font-weight: bolder;
font-size: 1.5rem;
}
.bottom__container li {
list-style: none;
display: inline-block;
padding: 32px;
}
.lists {
display: flex;
justify-content: center;
list-style: none;
margin: 0;
padding: 2rem;
text-align: center;
margin-top: 20px;
}
.btm-container__why {
font-size:2.5rem;
margin:0;
}
.btm-container__depends {
font-size: small;
text-align: right;
font-family: initial;
}
.list-item {
flex-grow: 1;
flex-basis: 0;
p {
position: absolute;
padding: 0 70px;
}
}
.circle {
width: 128px;
height: 128px;
border: 2px solid #424242;
border-radius: 50%;
margin: 0;
background-color: white;
}
.d-flex {
display: flex
}
.align-items-center {
align-items: center;
}
.flex-column {
flex-direction: column;
}
.justify-content-center {
justify-content: center;
}
.position-relative {
position: relative;
}
I have a school website which I want to have 2 carousel, 1 for showing the events conducted by the school through images(like a slideshow) and another to show the announcements through text.
When I added it in the CSS and JS for the 2nd carousel(announcements), my events slideshow became smaller.
After scripts and JS are added in:
CSS for Events carousel:
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 100%;
margin: auto;
}
HTML for Event:
<div class="jumbotron" style="background:transparent !important;">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="Images/event1.jpg" alt="1">
<div class="carousel-caption">
<h3>Event 1</h3>
<p>This is the 1st event</p>
</div>
</div>
<div class="item">
<img src="Images/event2.jpg" alt="2">
<div class="carousel-caption">
<h3>Event 2</h3>
<p>This is the 2nd event</p>
</div>
</div>
<div class="item">
<img src="Images/event3.jpg" alt="3">
<div class="carousel-caption">
<h3>Event 3</h3>
<p>This is the 3rd event</p>
</div>
</div>
<div class="item">
<img src="Images/event4.jpg" alt="4">
<div class="carousel-caption">
<h3>Event 4</h3>
<p>This is the 4th event</p>
</div>
</div>
<div class="item">
<img src="Images/event5.jpg" alt="5">
<div class="carousel-caption">
<h3>Event 5</h3>
<p>This is the 5th event</p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
CSS for Announcements carousel:
#carousel {
position: relative;
width: 100%;
margin: 0 auto;
}
#slides {
overflow: hidden;
position: relative;
width: 100%;
height: 250px;
}
#slides ul {
list-style: none;
width: 100%;
height: 250px;
margin: 0;
padding: 0;
position: relative;
}
#slides li {
width: 100%;
height: 250px;
float: left;
text-align: center;
position: relative;
font-family: lato, sans-serif;
}
/* Styling for prev and next buttons */
.btn-bar {
width: 60%;
margin: 0 auto;
display: block;
position: relative;
top: 40px;
}
#buttons {
padding: 0 0 5px 0;
float: left;
}
#buttons a {
text-align: center;
display: block;
font-size: 30px;
float: left;
outline: 0;
margin: 0 60px;
color: #b14943;
text-decoration: none;
display: block;
padding: 9px;
width: 35px;
}
a#prev:hover,
a#next:hover {
color: #FFF;
text-shadow: .5px 0px #b14943;
}
.bodyContent {
font-family: sans-serif;
font-weight: 300;
display: table-cell;
vertical-align: middle;
padding: 5px 20px;
font-family: 'Lato', Calibri, Arial, sans-serif;
}
.headContent {
/*font-size: 20px;*/
color: #000000;
font-size: 18px;
height: 30px;
}
.bodyContent {
height: 150px;
font-size: 12px;
color: #000;
text-shadow: .5px 0px #b14943;
}
.headers,
.content {
display: table;
width: 100%;
}
HTML for Announcements:
<div id="announcementSlider">
<div id="carousel">
<div id="slides">
<ul>
<li class="slide">
<div class="headers">
<h3 class="headContent">Announcement 1</h3>
</div>
<div class="content">
<p class="bodyContent">This is announcement 1</p>
</div>
</li>
<li class="slide">
<div class="headers">
<h3 class="headContent">Announcement 2</h3>
</div>
<div class="content">
<p class="bodyContent">This is announcement 2</p>
</div>
</li>
<li class="slide">
<div class="headers">
<h3 class="headContent">Announcement 3</h3>
</div>
<div class="content">
<p class="bodyContent">This is announcement 3</p>
</div>
</li>
</ul>
</div>
<div class="btn-bar">
<div id="buttons">
<a id="prev" href="#"><</a><a id="next" href="#">></a>
</div>
</div>
</div>
</div>
May I know how did my carousel for the event's get overwritten?