CSS styles are applied only for the first PHP-loop iteration - php

My problem is that CSS styles are applied only for the first PHP loop iteration. PHP loop outputs Wordpress posts. I've inspected the page structure and saw that it objects have the needed structure (blocks and classes), but CSS is not applied to them except for the first one.
<div id="events-feed">
<div class="container">
<div class="sym rose"></div>
<div class="title-wrapper">
<div class="title-wrap">
<div class="line"></div>
<div class="title">Наши события</div>
<div class="line"></div>
</div>
</div>
<?php
$args = array(
'posts_per_page'=> 5,
'orderby' => 'comment_count',
'category_name=events' );
$q = new WP_Query($args);
if($q->have_posts()) {
while($q->have_posts()){ $q->next_post();
$post_id = $q->post->ID;
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ) );
$title = get_the_title($post_id);
$date = get_the_date('d.m.Y', $post_id);
$content = get_post_field('post_content', $post_id);
?>
<div class="event-article">
<div class="events-post">
<div class="post-img" style="backgroung-image:url('$thumbnail[0]\')"></div>
<div class="post-header">
<?php echo $title; ?> </div>
<div class="post-date">
<div class="title-wrap">
<div class="line"></div>
<div class="title">
<?php echo $date; ?> </div>
<div class="line"></div>
</div>
</div>
</div>
<div class="desc">
<?php echo $content; ?>
</div>
</div>
</div>
</div>
<?php } } wp_reset_postdata(); ?>
The Styles & HTML are:
#events-feed {
background-color: #F9F6EB;
padding-top: 0.1px
}
#events-feed .title-wrapper {
padding: 20px 0;
position: relative;
text-align: center;
font-family: "PT Serif", serif;
padding: 0 50px;
margin-bottom: 65px
}
#events-feed .title-wrapper .title-wrap div {
display: inline-block;
vertical-align: middle
}
#events-feed .title-wrapper .title-wrap .line {
background: #0E0304;
height: 1px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
vertical-align: middle;
width: 15%;
z-index: 99
}
#events-feed .title-wrapper .title-wrap .title {
background-color: #F9F6EB;
color: #0E0304;
font-size: 40px;
padding: 0 20px;
text-transform: uppercase;
z-index: 999
}
#events-feed .event-article {
background-color: #fff;
-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
color: #0E0304;
height: 1000px;
margin: 0 10% 100px;
text-align: center;
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
-o-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)
}
#events-feed .event-article .events-post .post-img {
background-color: grey;
background-size: cover;
max-width: 2000px;
padding-top: 48%
}
#events-feed .event-article .events-post .post-header {
margin-top: 40px;
font-size: 34px;
text-transform: uppercase
}
#events-feed .event-article .events-post .post-date {
padding: 20px 0;
position: relative;
text-align: center;
margin-bottom: 30px
}
#events-feed .event-article .events-post .post-date .title-wrap div {
display: inline-block;
vertical-align: middle
}
#events-feed .event-article .events-post .post-date .title-wrap .line {
background: #7D8082;
height: 1px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
vertical-align: middle;
width: 15%;
z-index: 99
}
#events-feed .event-article .events-post .post-date .title-wrap .title {
background-color: #fff;
color: #7D8082;
font-size: 20px;
padding: 0 20px;
text-transform: capitalize;
z-index: 999
}
#events-feed .event-article .desc {
font-size: 20px;
margin: 0 50px
}
#events-feed .event-article .desc p {
margin-bottom: 27px
}
#events-feed .event-article .desc ul {
margin: 0 0 27px 40px;
text-align: left
}
.line {
height: 1px
}
<div id="events-feed" style="margin-top: 160px;">
<div class="container">
<div class="sym rose"></div>
<div class="title-wrapper">
<div class="title-wrap">
<div class="line"></div>
<div class="title">Наши события</div>
<div class="line"></div>
</div>
</div>
<div class="event-article">
<div class="events-post">
<div class="post-img" style="backgroung-image:url('$thumbnail[0]\')"></div>
<div class="post-header"> День рождения ElRumbo </div>
<div class="post-date">
<div class="title-wrap">
<div class="line"></div>
<div class="title"> 18.08.2015 </div>
<div class="line"></div>
</div>
</div>
</div>
<div class="desc">
18.08.2015 мы празднуем день рождения! В этот день с 19:00 мы принимаем гостей только по предзаказу столика. И подарки будем дарить мы!
<ul>
<li>Праздничная лотерея</li>
<li>Скидка 20%</li>
<li>Бокал вина в подарок каждому</li>
</ul>
В 21:45 фаер-шоу от творческой группы "FaBula" Будем рады быть вместе с вами в наш праздничный вечер!
<strong>Подробности при заказе столика.</strong>
</div>
</div>
</div>
</div>
<div class="event-article">
<div class="events-post">
<div class="post-img" style="backgroung-image:url('$thumbnail[0]\')"></div>
<div class="post-header"> День святого Валентина </div>
<div class="post-date">
<div class="title-wrap">
<div class="line"></div>
<div class="title"> 14.02.2016 </div>
<div class="line"></div>
</div>
</div>
</div>
<div class="desc">
Dias de los Enamorados 14 февраля - День Святого Валентина В этот вечер по предзаказу столика вас ждут:
<ul>
<li>Скидка 20% на коктейли группы "Мартини"</li>
<li>Праздничная лотерея</li>
<li>Особый коктейль, которого нет в меню</li>
</ul>
</div>
</div>

Thanks to Mr. or Mrs. FlyffyKitten I found the solution:
I had to move the least two closing tags out of the loop since they refer to parent elements of the looped objects. Sorry for disturbing everyone. Thank you for being helpful!

Related

How to make my loading screen div take up my whole entire screen, even everything below it

I'm trying to make a loading screen cause I'm using PHP to dynamically bring in specific services for this website I'm making and I tried using height: 100% on my wrapper div and it just does not work. I got to a point where I tried height: 100vh but obviously it only takes 100% of the view area so I can just scroll down and see the other content.
HTML
<?php include ('header.php'); ?>
</head>
<body>
<div class="background-loading">
<div class="wrapper">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<span>Loading</span>
</div>
</div>
<div class="banner-section" style="background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(images3/heroImage.jpg);">
<h1>Services</h1>
</div>
<div class="services-section">
<div class="services">
<?php
require_once 'includes/dbh-inc.php';
$sql = "SELECT serviceName, servicePageName, serviceImage FROM addService";
$result = $conn-> query($sql);
if ($result-> num_rows > 0) {
while ($row = $result-> fetch_assoc()) {
echo '<div class="service-title">';
echo '<h2>'. $row["serviceName"] .'</h2>';
echo '</div>';
echo '<a href='. $row["servicePageName"] .'>';
echo '<div class="service-container" style="background-image: url(data:image/jpg;base64,'.base64_encode($row['serviceImage']).')">';
echo '<h1>Click Me!</h1>';
echo '</div>';
echo '</a>';
}
}
$conn-> close();
?>
<!--
<div class="service-title">
<h2>Business Printing</h2>
</div>
<a href="businessPrinting.php">
<div class="service-container" style="background-image: url(images3/business1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
<div class="service-title">
<h2>Canvas Printing</h2>
</div>
<a href="canvasPrinting.php">
<div class="service-container" style="background-image: url(images3/canvas1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
<div class="service-title">
<h2>Custom Apperal</h2>
</div>
<a href="">
<div class="service-container" style="background-image: url(images3/apperal1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
<div class="service-title">
<h2>Embroidery</h2>
</div>
<a href="">
<div class="service-container" style="background-image: url(images3/embroidery1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
<div class="service-title">
<h2>Engraving</h2>
</div>
<a href="">
<div class="service-container" style="background-image: url(images3/engraving1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
<div class="service-title">
<h2>Signs</h2>
</div>
<a href="signsAndBanners.php">
<div class="service-container" style="background-image: url(images3/signs1.jpg);">
<h1>Click Me!</h1>
</div>
</a>
-->
</div>
</div>
<?php include ('footer.php'); ?>
CSS
/* Screen Loader */
.background-loading {
background-color: var(--clr-primary);
z-index: 1000;
height: 100vh;
position: sticky;
}
.wrapper{
width:200px;
height:60px;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%, -50%);
}
.circle{
width:20px;
height:20px;
position: absolute;
border-radius: 50%;
background-color: #fff;
left:15%;
transform-origin: 50%;
animation: circle .5s alternate infinite ease;
}
#keyframes circle{
0%{
top:60px;
height:5px;
border-radius: 50px 50px 25px 25px;
transform: scaleX(1.7);
}
40%{
height:20px;
border-radius: 50%;
transform: scaleX(1);
}
100%{
top:0%;
}
}
.circle:nth-child(2){
left:45%;
animation-delay: .2s;
}
.circle:nth-child(3){
left:auto;
right:15%;
animation-delay: .3s;
}
.shadow{
width:20px;
height:4px;
border-radius: 50%;
background-color: rgba(0,0,0,.5);
position: absolute;
top:62px;
transform-origin: 50%;
z-index: -1;
left:15%;
filter: blur(1px);
animation: shadow .5s alternate infinite ease;
}
#keyframes shadow{
0%{
transform: scaleX(1.5);
}
40%{
transform: scaleX(1);
opacity: .7;
}
100%{
transform: scaleX(.2);
opacity: .4;
}
}
.shadow:nth-child(4){
left: 45%;
animation-delay: .2s
}
.shadow:nth-child(5){
left:auto;
right:15%;
animation-delay: .3s;
}
.wrapper span{
position: absolute;
top:75px;
font-family: 'Lato';
font-size: 20px;
letter-spacing: 12px;
color: #fff;
left:15%;
}
What you are looking for is called modal. One way to do that is use position fixed, a non-transparent background, 100% width and height and a higher z-index than the rest of your content. Then pin it to the top left.
Then when you are done loading, set its display to "none".
window.setTimeout(()=>{document.getElementById('background-loading').style.display = 'none';}, 3000);
#background-loading {
background-color: white;
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1;
}
.wrapper{
width:200px;
height:60px;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%, -50%);
}
.circle{
width:20px;
height:20px;
position: absolute;
border-radius: 50%;
background-color: #fff;
left:15%;
transform-origin: 50%;
animation: circle .5s alternate infinite ease;
}
#keyframes circle{
0%{
top:60px;
height:5px;
border-radius: 50px 50px 25px 25px;
transform: scaleX(1.7);
}
40%{
height:20px;
border-radius: 50%;
transform: scaleX(1);
}
100%{
top:0%;
}
}
.circle:nth-child(2){
left:45%;
animation-delay: .2s;
}
.circle:nth-child(3){
left:auto;
right:15%;
animation-delay: .3s;
}
.shadow{
width:20px;
height:4px;
border-radius: 50%;
background-color: rgba(0,0,0,.5);
position: absolute;
top:62px;
transform-origin: 50%;
z-index: -1;
left:15%;
filter: blur(1px);
animation: shadow .5s alternate infinite ease;
}
#keyframes shadow{
0%{
transform: scaleX(1.5);
}
40%{
transform: scaleX(1);
opacity: .7;
}
100%{
transform: scaleX(.2);
opacity: .4;
}
}
.shadow:nth-child(4){
left: 45%;
animation-delay: .2s
}
.shadow:nth-child(5){
left:auto;
right:15%;
animation-delay: .3s;
}
.wrapper span{
position: absolute;
top:75px;
font-family: 'Lato';
font-size: 20px;
letter-spacing: 12px;
color: #fff;
left:15%;
}
<div id="background-loading">
<div class="wrapper">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<span>Loading</span>
</div>
</div>
Other content

scrollbar not scrollable footer taking up page in Wordpress Theme

Having issues after converting HTML Template to Wordpress Theme. I'm using a social media theme called Adda and the scrolling bar at the bottom that shows the active users is displaying active users stacked on top of each other instead of in a row that you can scroll through. Since the HTML and CSS was premade my guess is the issue is in my functions.php, but I've included the HTML and CSS I think could help. Any help would be appreciated.
What it should look like
What mine looks like
What mine looks like in mobile
Here is a my function.php
<?php
//load stylesheets
function load_stylesheets()
{
wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/vendor/bootstrap.min.css', array(), 1, 'all');
wp_enqueue_style('bootstrap');
wp_register_style('bicon', get_template_directory_uri() . '/assets/css/vendor/bicon.min.css', array(), 1, 'all');
wp_enqueue_style('bicon');
wp_register_style('flaticon', get_template_directory_uri() . '/assets/css/vendor/flaticon.css', array(), 1, 'all');
wp_enqueue_style('flaticon');
wp_register_style('plyr', get_template_directory_uri() . '/assets/css/plugins/plyr.css', array(), 1, 'all');
wp_enqueue_style('plyr');
wp_register_style('slick', get_template_directory_uri() . '/assets/css/plugins/slick.min.css', array(), 1, 'all');
wp_enqueue_style('slick');
wp_register_style('nice', get_template_directory_uri() . '/assets/css/plugins/nice-select.css', array(), 1, 'all');
wp_enqueue_style('nice');
wp_register_style('perfect', get_template_directory_uri() . '/assets/css/plugins/perfect-scrollbar.css', array(), 1, 'all');
wp_enqueue_style('perfect');
wp_register_style('lightgallery', get_template_directory_uri() . '/assets/css/plugins/lightgallery.min.css', array(), 1, 'all');
wp_enqueue_style('lightgallery');
wp_register_style('style', get_template_directory_uri() . '/assets/css/style.css', array(), 1, 'all');
wp_enqueue_style('style');
wp_register_style('custom', get_template_directory_uri() . '/custom.css', array(), 1, 'all');
wp_enqueue_style('custom');
}
add_action('wp_enqueue_scripts', 'load_stylesheets');
//load scripts
function addjs()
{
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-3.6.0.min.js', array(), 1, 1, 1);
wp_enqueue_script('modernizr');
wp_register_script('jquery', get_template_directory_uri() . '/jquery-3.3.1.min.js', array(), 1, 1, 1);
wp_enqueue_script('jquery');
wp_register_script('popper', get_template_directory_uri() . '/assets/js/vendor/popper.min.js', array(), 1, 1, 1);
wp_enqueue_script('popper');
wp_register_script('bootstrap', get_template_directory_uri() . 'assets/js/vendor/bootstrap.min.js', array(), 1, 1, 1);
wp_enqueue_script('bootstrap');
wp_register_script('slick', get_template_directory_uri() . 'assets/js/plugins/slick.min.js', array(), 1, 1, 1);
wp_enqueue_script('slick');
wp_register_script('nice', get_template_directory_uri() . 'assets/js/plugins/nice-select.min.js', array(), 1, 1, 1);
wp_enqueue_script('nice');
wp_register_script('plyr', get_template_directory_uri() . 'assets/js/plugins/plyr.min.js', array(), 1, 1, 1);
wp_enqueue_script('plyr');
wp_register_script('perfect', get_template_directory_uri() . 'assets/js/plugins/perfect-scrollbar.min.js', array(), 1, 1, 1);
wp_enqueue_script('perfect');
wp_register_script('lightgallery', get_template_directory_uri() . 'assets/js/plugins/lightgallery-all.min.js', array(), 1, 1, 1);
wp_enqueue_script('lightgallery');
wp_register_script('imageloaded', get_template_directory_uri() . 'assets/js/plugins/imagesloaded.pkgd.min.js', array(), 1, 1, 1);
wp_enqueue_script('lightgallery');
wp_register_script('isotope', get_template_directory_uri() . 'assets/js/plugins/isotope.pkgd.min.js', array(), 1, 1, 1);
wp_enqueue_script('isotope');
wp_register_script('main', get_template_directory_uri() . 'assets/js/main.js', array(), 1, 1, 1);
wp_enqueue_script('main');
}
Here is the HTML for the scrollbar
<div class="frnd-search-inner custom-scroll">
<ul>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-1.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Jon Wilime</h6>
<p>Many desktop publishing</p>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-2.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Jon Wileyam</h6>
<button class="add-frnd">add friend</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-3.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Mili Raoulin</h6>
<button class="add-frnd">add friend</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-4.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Jon Wilime</h6>
<button class="add-frnd">10 mutual friends</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-5.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Robart faul</h6>
<button class="add-frnd">12 mutual friends</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-3.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Mili Raoulin</h6>
<button class="add-frnd">add friend</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-4.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Jon Wilime</h6>
<button class="add-frnd">10 mutual friends</button>
</div>
</li>
<li class="d-flex align-items-center profile-active">
<!-- profile picture end -->
<div class="profile-thumb active">
<a href="#">
<figure class="profile-thumb-small">
<img src="<?php bloginfo('template_directory');?>/assets/images/profile/profile-small-5.jpg" alt="profile picture">
</figure>
</a>
</div>
<!-- profile picture end -->
<div class="posted-author">
<h6 class="author">Robart faul</h6>
<button class="add-frnd">12 mutual friends</button>
</div>
</li>
</ul>
</div>
</div>
</div>
CSS for scrollbar
/*Custom Scroll (Perfect Scroll)*/
.custom-scroll {
position: relative;
overflow: hidden;
}
.custom-scroll.ps .ps__rail-y,
.custom-scroll.ps .ps__rail-x {
background-color: transparent;
}
.custom-scroll.ps .ps__rail-y [class*="ps__thumb"],
.custom-scroll.ps .ps__rail-x [class*="ps__thumb"] {
-webkit-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.custom-scroll.ps .ps__rail-y {
width: 3px;
right: 2px;
}
.custom-scroll.ps .ps__rail-y .ps__thumb-y {
width: 100%;
right: 0;
}
.custom-scroll.ps .ps__rail-x {
height: 6px;
bottom: 3px;
}
.custom-scroll.ps .ps__rail-x .ps__thumb-x {
height: 100%;
}
.slick-arrow-style button.slick-arrow {
top: 50%;
left: 0;
color: #333333;
font-size: 30px;
cursor: pointer;
display: block;
line-height: 1;
position: absolute;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
z-index: 1;
-webkit-transition: 0.4s;
-o-transition: 0.4s;
transition: 0.4s;
}
.slick-arrow-style button.slick-arrow.slick-next {
left: auto;
right: 0;
}
.slick-arrow-style button.slick-arrow:hover {
color: #dc4734;
}
.slick-track {
line-height: 1;
}
.slick-row-3 .slick-list {
margin: 0 -3px;
}
.slick-row-3 .slick-list .slick-slide {
margin: 0 3px;
}
.slick-row-4 .slick-list {
margin: 0 -4px;
}
.slick-row-4 .slick-list .slick-slide {
margin: 0 4px;
}
.slick-row-5 .slick-list {
margin: 0 -5px;
}
.slick-row-5 .slick-list .slick-slide {
margin: 0 5px;
}
.slick-row-6 .slick-list {
margin: 0 -6px;
}
.slick-row-6 .slick-list .slick-slide {
margin: 0 6px;
}
.slick-row-7 .slick-list {
margin: 0 -7px;
}
.slick-row-7 .slick-list .slick-slide {
margin: 0 7px;
}
.slick-row-8 .slick-list {
margin: 0 -8px;
}
.slick-row-8 .slick-list .slick-slide {
margin: 0 8px;
}
.slick-row-9 .slick-list {
margin: 0 -9px;
}
.slick-row-9 .slick-list .slick-slide {
margin: 0 9px;
}
.slick-row-10 .slick-list {
margin: 0 -10px;
}
.slick-row-10 .slick-list .slick-slide {
margin: 0 10px;
}
.slick-row-11 .slick-list {
margin: 0 -11px;
}
.slick-row-11 .slick-list .slick-slide {
margin: 0 11px;
}
.slick-row-12 .slick-list {
margin: 0 -12px;
}
.slick-row-12 .slick-list .slick-slide {
margin: 0 12px;
}
.slick-row-13 .slick-list {
margin: 0 -13px;
}
.slick-row-13 .slick-list .slick-slide {
margin: 0 13px;
}
.slick-row-14 .slick-list {
margin: 0 -14px;
}
.slick-row-14 .slick-list .slick-slide {
margin: 0 14px;
}
.slick-row-15 .slick-list {
margin: 0 -15px;
}
.slick-row-15 .slick-list .slick-slide {
margin: 0 15px;
}
.slick-row-16 .slick-list {
margin: 0 -16px;
}
.slick-row-16 .slick-list .slick-slide {
margin: 0 16px;
}
.slick-row-17 .slick-list {
margin: 0 -17px;
}
.slick-row-17 .slick-list .slick-slide {
margin: 0 17px;
}
.slick-row-18 .slick-list {
margin: 0 -18px;
}
.slick-row-18 .slick-list .slick-slide {
margin: 0 18px;
}
.slick-row-19 .slick-list {
margin: 0 -19px;
}
.slick-row-19 .slick-list .slick-slide {
margin: 0 19px;
}
.slick-row-20 .slick-list {
margin: 0 -20px;
}
.slick-row-20 .slick-list .slick-slide {
margin: 0 20px;
}
/*------- friend search box start -------*/
.friends-search {
width: 100%;
}
.frnd-search-title {
height: 62px;
padding: 0 25px;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
background-color: #dc4734;
}
.frnd-search-title .frnd-search-icon,
.frnd-search-title .close-btn {
color: #fff;
font-size: 20px;
}
.frnd-search-title .frnd-search-icon:hover,
.frnd-search-title .close-btn:hover {
color: #333333;
}
.frnd-search-title p {
color: #fff;
font-size: 18px;
font-weight: 500;
line-height: 1;
margin-bottom: 0;
text-transform: capitalize;
}
.search-box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.search-field {
width: 100%;
border: none;
padding-right: 10px;
color: #666666;
}
.search-btn {
color: #333333;
font-size: 20px;
}
.search-btn:hover {
color: #dc4734;
}
.friend-search-list {
bottom: calc(100% + 10px);
left: 0;
width: 100%;
background-color: #fff;
position: absolute;
opacity: 0;
visibility: hidden;
-webkit-transition: 0.4s;
-o-transition: 0.4s;
transition: 0.4s;
-webkit-transform: scaleY(0);
-ms-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: bottom;
-ms-transform-origin: bottom;
transform-origin: bottom;
}
.friend-search-list.show {
opacity: 1;
visibility: visible;
-webkit-transform: scaleY(1);
-ms-transform: scaleY(1);
transform: scaleY(1);
}
.friend-search-list ul li {
margin-bottom: 20px;
}
.friend-search-list ul li:last-child {
margin-bottom: 0;
}
.friend-search-list ul li .add-frnd {
display: block;
font-size: 12px;
padding-top: 5px;
color: #666666;
text-transform: capitalize;
}
.friend-search-list ul li .add-frnd:hover {
color: #dc4734;
}
.frnd-search-inner {
height: 350px;
margin: 25px 0;
padding: 0 25px;
}
.frnd-search-inner ul li {
cursor: pointer;
}
.frnd-search-inner ul li .posted-author p {
color: #666666;
font-size: 13px;
padding-top: 5px;
}
/*------- friend search box end -------*/
Try adding the following to the css.
li {
display: inline-block;
}
It looks like you are using a bulleted list. Typically the items or in the list will be stacked on top of each other by default. To get a better understanding see what happens when you remove "display: inline-block;" from the simulation in the link below.
https://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal

html container scrolling bug

My html page is working almost as should but i have been scrolling through stackoverflow and can't seems to find any answer specific to mine.
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
}
h1 {
font-family: arial;
color: rgb(128, 128, 128);
text-align: center;
margin: 0;
overflow: auto;
}
header {
margin: 0;
width: 100%;
top: 0; left: 0;
padding: 0;
height: 30%;
position: fixed;
line-height: 350%;
background: black;
background-image: url(profile_pic.jpg);
background-repeat: no-repeat;
background-position: right;
background-size: 20% 70%;
color: rgb(190, 190, 190);
text-align: center;
border-spacing: 5px 10px;
border: 1px solid black;
}
nav {
display: flex;
text-align: center;
height: 25px;
position: fixed;
top: 30%;
width: 100%;
background: rgb(80, 80, 80);
border: 1px solid rgb(80, 80, 80);
}
.nav_link {
flex-grow: 1;
line-height: 25px;
}
a {
text-decoration: none;
color: white;
}
a:hover {
text-decoration: underline;
}
.content {
width: 100%;
overflow-y: scroll;
height: 100%;
margin: 20% 0% 0% 0%;
padding-top: 6%;
}
.myPanel {
border: 1px solid black;
border-radius: 7px 7px 7px 7px;
box-shadow: 0px 0px 4px 999;
width: 45%;
margin: 1%;
}
.myPanel .heading {
background: rgb(80, 80, 80);
border-radius: 5px 5px 0px 0px;
color: white;
padding: 5px 20px;
}
.myPanel .panelBody {
padding: 3px 20px;
background: silver;
border-radius: 0px 0px 5px 5px;
}
.myPanel p {
margin: 3px;
}
.myPanel:hover {
box-shadow: 0px 0px 8px black;
}
<?php include 'head.php';?>
<body>
<header>
<h1>Resume</h1>
</header>
<nav>
<div class="nav_link">
Home
</div>
<div class="nav_link">
Resume
</div>
<div class="nav_link">
Side Projects
</div>
<div class="nav_link">
About Me
</div>
</nav>
<div class="content">
<div class="myPanel">
<div class="heading">US ARMY NATIONAL GUARD</div>
<div class="panelBody">
<p>03/2014 -- Current</p>
<div class="showOnHover">
<p>
<p>Crystal River, FL</p>
<ul>
<ui>Rank: PV2</ui></br>
<ui>Diesel Mechanic -- 91H</ui></br>
<ui>Military Police -- 31b</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
<p>Clermont FL</p>
<ul>
<ui>Serving</ui></br>
<ui>Bartending</ui></br>
<ui>Service bar</ui></br>
<ui>Card Holder voids/comps</ui></br>
<ui>Open/close</ui></br>
<ui>Food running</ui></br>
<ui>Expediting</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PANE D'OR</div>
<div class="panelBody">
<p>08/2015 -- 06/2016</p>
<div class="showOnHover">
<p>
<p>Winter Garden FL</p>
<ul>
<ui>Baking</ui></br>
<ui>Pastry</ui></br>
<ui>Delivering</ui></br>
<ui>Sales at markets / shop</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">Disney</div>
<div class="panelBody">
<p>06/2015 -- 11/2016</p>
<div class="showOnHover">
<p class>
<p>Orlando FL</p>
<ul>
<ui>Monorail pilot</ui></br>
<ui>Platform operator</ui></br>
<ui>Audience control</ui></br>
<ui>Customer relations</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PERFORMANCE YEARS GTO</div>
<div class="panelBody">
<p>01/2012 -- 02/2015</p>
<div class="showOnHover">
<p>
<p>Hatfield PA</p>
<ul>
<ui>Shipping</ui></br>
<ui>Receiving</ui></br>
<ui>Pulling/packing/sorting</ui></br>
<ui>Picker operator</ui></br>
<ui>Forklift operator</ui></br>
<ui>Customer service</ui></br>
<ui>In house sales</ui></br>
<ui>Show sales</ui></br>
<ui>Inventory</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">GIANT FOODS</div>
<div class="panelBody">
<p>01/2012 -- 03/2013</p>
<div class="showOnHover">
<p>
<p>Montgomeryville PA</p>
<ul>
<ui>Stocking shelves</ui></br>
<ui>Rotate merchandise</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
so with the fiddle its slightly modified to work on that application. the only differences are that i use some php to form a template for the header and nav bar on my computer.
okay so if you view the fiddle the scroll bar is not only the area i want to scroll but the entire page. i would like to keep the header fixed and have the "body" or for my page the container scroll but not have a full length scroll bar on side of page.
Add position:fixed; to body and overflow-y:scroll to .content
Also don't "close" /br
It's just br or, br/ for extra compatibility.
<br/>
You also can't nest p tags (have a p tag inside another p tag) or have a list inside a p tag - a list gets its own styling - so get rid of the p around your list+list heading. And you have an extra /div at the end of each myPanel - there should only be three.
Also, 0 values shouldn't have units (eg %) after them. Run your CSS through csslint.net
You've also got some unecessary CSS attributes in there - e.g., your header and nav don't need top/right positioning or position:fixed.
https://jsfiddle.net/Kass_P/kg6uppnm/25/
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
position:fixed;
}
Simply remove height from body class.
Set height:40% or so for content class.
Also, make all <div class="myPanel"> inside the <div class="content"> div
Hope it helps
See the full working code:
<html>
<head>
<style>
body {
width: 100%;
padding: 0;
margin: 0;
border: 0;
}
h1 {
font-family: arial;
color: rgb(128, 128, 128);
text-align: center;
margin: 0;
overflow: auto;
}
header {
margin: 0;
width: 100%;
top: 0; left: 0;
padding: 0;
height: 30%;
position: fixed;
line-height: 350%;
background: black;
background-image: url(profile_pic.jpg);
background-repeat: no-repeat;
background-position: right;
background-size: 20% 70%;
color: rgb(190, 190, 190);
text-align: center;
border-spacing: 5px 10px;
border: 1px solid black;
}
nav {
display: flex;
text-align: center;
height: 25px;
position: fixed;
top: 30%;
width: 100%;
background: rgb(80, 80, 80);
border: 1px solid rgb(80, 80, 80);
}
.nav_link {
flex-grow: 1;
line-height: 25px;
}
a {
text-decoration: none;
color: white;
}
a:hover {
text-decoration: underline;
}
.content {
width: 100%;
overflow-y: scroll;
height: 40%;
margin: 20% 0% 0% 0%;
padding-top: 6%;
}
.myPanel {
border: 1px solid black;
border-radius: 7px 7px 7px 7px;
box-shadow: 0px 0px 4px 999;
width: 45%;
margin: 1%;
}
.myPanel .heading {
background: rgb(80, 80, 80);
border-radius: 5px 5px 0px 0px;
color: white;
padding: 5px 20px;
}
.myPanel .panelBody {
padding: 3px 20px;
background: silver;
border-radius: 0px 0px 5px 5px;
}
.myPanel p {
margin: 3px;
}
.myPanel:hover {
box-shadow: 0px 0px 8px black;
}
</style></head>
<body>
<header>
<h1>Resume</h1>
</header>
<nav>
<div class="nav_link">
Home
</div>
<div class="nav_link">
Resume
</div>
<div class="nav_link">
Side Projects
</div>
<div class="nav_link">
About Me
</div>
</nav>
<div class="content">
<div class="myPanel">
<div class="heading">US ARMY NATIONAL GUARD</div>
<div class="panelBody">
<p>03/2014 -- Current</p>
<div class="showOnHover">
<p>
<p>Crystal River, FL</p>
<ul>
<ui>Rank: PV2</ui></br>
<ui>Diesel Mechanic -- 91H</ui></br>
<ui>Military Police -- 31b</ui></br>
</ul>
</p>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
<p>Clermont FL</p>
<ul>
<ui>Serving</ui></br>
<ui>Bartending</ui></br>
<ui>Service bar</ui></br>
<ui>Card Holder voids/comps</ui></br>
<ui>Open/close</ui></br>
<ui>Food running</ui></br>
<ui>Expediting</ui></br>
</ul>
</p>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PANE D'OR</div>
<div class="panelBody">
<p>08/2015 -- 06/2016</p>
<div class="showOnHover">
<p>
<p>Winter Garden FL</p>
<ul>
<ui>Baking</ui></br>
<ui>Pastry</ui></br>
<ui>Delivering</ui></br>
<ui>Sales at markets / shop</ui></br>
</ul>
</p>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">Disney</div>
<div class="panelBody">
<p>06/2015 -- 11/2016</p>
<div class="showOnHover">
<p class>
<p>Orlando FL</p>
<ul>
<ui>Monorail pilot</ui></br>
<ui>Platform operator</ui></br>
<ui>Audience control</ui></br>
<ui>Customer relations</ui></br>
</ul>
</p>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PERFORMANCE YEARS GTO</div>
<div class="panelBody">
<p>01/2012 -- 02/2015</p>
<div class="showOnHover">
<p>
<p>Hatfield PA</p>
<ul>
<ui>Shipping</ui></br>
<ui>Receiving</ui></br>
<ui>Pulling/packing/sorting</ui></br>
<ui>Picker operator</ui></br>
<ui>Forklift operator</ui></br>
<ui>Customer service</ui></br>
<ui>In house sales</ui></br>
<ui>Show sales</ui></br>
<ui>Inventory</ui></br>
</ul>
</p>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">GIANT FOODS</div>
<div class="panelBody">
<p>01/2012 -- 03/2013</p>
<div class="showOnHover">
<p>
<p>Montgomeryville PA</p>
<ul>
<ui>Stocking shelves</ui></br>
<ui>Rotate merchandise</ui></br>
</ul>
</p>
</div>
</div>
</div>
</div>
</body>
</html>
Firstly you need to do what you said they all should be ! ...
Then you must fix the height of div content to the screen. In other way if you want your body has not scroll bar, You must set your elements so fixed to the screen and your body has not vertical overflow. Some thing like this:
header{height: 60px;}
nav{height: 40px;}
.content{height: calc(100vh - 100px);}
Then you can set a vertical scroll bar for div content.
#content{overflow-y: auto;}
See this simplified of your page:
header {
margin: 0;
width: 100%;
top: 0;
left: 0;
padding: 0;
height: 60px;
position: fixed;
line-height: 350%;
background: black;
background-image: url(profile_pic.jpg);
background-repeat: no-repeat;
background-position: right;
background-size: 20% 70%;
color: rgb(190, 190, 190);
text-align: center;
border-spacing: 5px 10px;
border: 1px solid black;
}
.content {
width: 100%;
overflow-y: scroll;
height: 100%;
margin-top: 60px;
height: calc(100vh - 70px);
}
.myPanel {
border: 1px solid black;
border-radius: 7px 7px 7px 7px;
box-shadow: 0px 0px 4px 999;
width: 45%;
margin: 1%;
}
.myPanel .heading {
background: rgb(80, 80, 80);
border-radius: 5px 5px 0px 0px;
color: white;
padding: 5px 20px;
}
.myPanel .panelBody {
padding: 3px 20px;
background: silver;
border-radius: 0px 0px 5px 5px;
}
.myPanel p {
margin: 3px;
}
.myPanel:hover {
box-shadow: 0px 0px 8px black;
}
<!--?php include 'head.php';?-->
<header>
<h1>Resume</h1>
</header>
<div class="content">
<div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
</p><p>Clermont FL</p>
<ul>
<ui>Serving</ui><br>
<ui>Bartending</ui><br>
<ui>Service bar</ui><br>
<ui>Card Holder voids/comps</ui><br>
<ui>Open/close</ui><br>
<ui>Food running</ui><br>
<ui>Expediting</ui><br>
</ul>
<p></p>
</div>
</div>
</div><div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
</p><p>Clermont FL</p>
<ul>
<ui>Serving</ui><br>
<ui>Bartending</ui><br>
<ui>Service bar</ui><br>
<ui>Card Holder voids/comps</ui><br>
<ui>Open/close</ui><br>
<ui>Food running</ui><br>
<ui>Expediting</ui><br>
</ul>
<p></p>
</div>
</div>
</div><div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
</p><p>Clermont FL</p>
<ul>
<ui>Serving</ui><br>
<ui>Bartending</ui><br>
<ui>Service bar</ui><br>
<ui>Card Holder voids/comps</ui><br>
<ui>Open/close</ui><br>
<ui>Food running</ui><br>
<ui>Expediting</ui><br>
</ul>
<p></p>
</div>
</div>
</div><div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
</p><p>Clermont FL</p>
<ul>
<ui>Serving</ui><br>
<ui>Bartending</ui><br>
<ui>Service bar</ui><br>
<ui>Card Holder voids/comps</ui><br>
<ui>Open/close</ui><br>
<ui>Food running</ui><br>
<ui>Expediting</ui><br>
</ul>
<p></p>
</div>
</div>
</div><div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelBody">
<p>06/2016 -- 02/2017</p>
<div class="showOnHover">
<p>
</p><p>Clermont FL</p>
<ul>
<ui>Serving</ui><br>
<ui>Bartending</ui><br>
<ui>Service bar</ui><br>
<ui>Card Holder voids/comps</ui><br>
<ui>Open/close</ui><br>
<ui>Food running</ui><br>
<ui>Expediting</ui><br>
</ul>
<p></p>
</div>
</div>
</div>
</div>

div content is clipped from bottom of the webpage

If you scroll down on https://jsfiddle.net/rtvrueg9/ you can see that some of the content at the bottom is not showing. any suggestions?
<?php include 'head.php';?>
That's because of position fixed in your body, i added overflow-x: hidden; instead of that to remove horizontal scroll bar.
If that vertical horizontal bar bothers you remove unnessary overflow-y in .content
}
body {
width: 100%;
height: 100%;
padding: 0;
border: 0;
margin: 0;
overflow-x: hidden; /* EDIT */
}
h1 {
font-family: arial;
color: rgb(128, 128, 128);
text-align: center;
margin: 0;
}
header {
margin: 0;
padding: 0;
width: 100%;
height: 30%;
background: black;
background-image: url(profile_pic.jpg);
background-repeat: no-repeat;
background-position: right;
background-size: 20% 70%;
color: rgb(190, 190, 190);
text-align: center;
border-spacing: 5px 10px;
border: 1px solid black;
}
nav {
display: flex;
text-align: center;
height: 25px;
width: 100%;
background: rgb(80, 80, 80);
border: 1px solid rgb(80, 80, 80);
}
.nav_link {
flex-grow: 1;
line-height: 25px;
}
a {
text-decoration: none;
color: white;
}
a:hover {
text-decoration: underline;
}
.content {
width: 100%;
height: 100%;
margin: 0;
overflow-y:scroll; }
.myPanel {
border: 1px solid black;
border-radius: 7px 7px 7px 7px;
box-shadow: 0px 0px 4px 999;
width: 60%;
margin: 1% auto;
}
.myPanel .heading {
background: rgb(80, 80, 80);
border-radius: 5px 5px 0px 0px;
color: white;
padding: 5px 20px;
}
.myPanel .panelTime {
padding: 3px 20px;
background: silver;
border-radius: 0px 0px 5px 5px;
}
.myPanel p {
margin: 3px 0px 0px 3px;
}
.myPanel:hover {
box-shadow: 0px 0px 8px black;
}
.myPanel.heading:hover {
background: white;
border-radius: 5px 5px 0px 0px;
color: black;
font-family: arial;
}
.myPanel.panelTime:hover {
background: rgb(80, 80, 80);
font-family: arial;
color: white;
}
<?php include 'head.php';?>
<body>
<header>
<h1>Resume</h1>
</header>
<nav>
<div class="nav_link">
Home
</div>
<div class="nav_link">
Resume
</div>
<div class="nav_link">
Side Projects
</div>
<div class="nav_link">
About Me
</div>
</nav>
<div class="content">
<div class="myPanel">
<div class="heading">US ARMY NATIONAL GUARD</div>
<div class="panelTime">
<p>03/2014 -- Current</p>
<div class="panelBody">
<p>Crystal River, FL</p>
<ul>
<ui>Rank: PV2</ui></br>
<ui>Diesel Mechanic -- 91H</ui></br>
<ui>Military Police -- 31b<ui></br>
</ul>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">LILLYS ON THE LAKE</div>
<div class="panelTime">
<p>06/2016 -- 02/2017</p>
<div class="panelBody">
<p>Clermont FL</p>
<ul>
<ui>Serving</ui></br>
<ui>Bartending</ui></br>
<ui>Service bar</ui></br>
<ui>Card Holder voids/comps</ui></br>
<ui>Open/close</ui></br>
<ui>Food running</ui></br>
<ui>Expediting</ui></br>
</ul>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PANE D'OR</div>
<div class="panelTime">
<p>08/2015 -- 06/2016</p>
<div class="panelBody">
<p>Winter Garden FL</p>
<ul>
<ui>Baking</ui></br>
<ui>Pastry</ui></br>
<ui>Delivering</ui></br>
<ui>Sales at markets / shop</ui></br>
</ul>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">Disney</div>
<div class="panelTime">
<p>06/2015 -- 11/2016</p>
<div class="panelBody">
<p>Orlando FL</p>
<ul>
<ui>Monorail pilot</ui></br>
<ui>Platform operator</ui></br>
<ui>Audience control</ui></br>
<ui>Customer relations</ui></br>
</ul>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">PERFORMANCE YEARS GTO</div>
<div class="panelTime">
<p>01/2012 -- 02/2015</p>
<div class="panelBody">
<p>Hatfield PA</p>
<ul>
<ui>Shipping</ui></br>
<ui>Receiving</ui></br>
<ui>Pulling/packing/sorting</ui></br>
<ui>Picker operator</ui></br>
<ui>Forklift operator</ui></br>
<ui>Customer service</ui></br>
<ui>In house sales</ui></br>
<ui>Show sales</ui></br>
<ui>Inventory</ui></br>
</ul>
</div>
</div>
</div>
<div class="myPanel">
<div class="heading">GIANT FOODS</div>
<div class="panelTime">
<p>01/2012 -- 03/2013</p>
<div class="panelBody">
<p>Montgomeryville PA</p>
<ul>
<ui>Stocking shelves</ui></br>
<ui>Rotate merchandise</ui></br>
</ul>
</div>
</div>
</div>
</div>
Use:
<?php include_once("head.php"); ?>
be sure the head.php file is in the same directory of your html file, also your htlm file should be renamed from index.html to index.php with the php extension

Bootstrap distorting the Border-Radius icon/image

So Im working on a project for a client and ran into an issue with Border-Radius + Bootstrap,
<div class="header">
<div class="top-nav">
<div class="container">
<div class="row">
<img class="logo" src="<?php if($custom_logo){echo $custom_logo; }else{echo $avatar;} ?>">
<nav class="social-media-top">
<h1 class="col-xs-12">Hello, I am <span><?php echo $twitch_username; ?></span></h1>
<?php if($twitch_username){ ?>
<li><i class="fa fa-twitch"></i></li>
This is after adding bootstrap to make it more responsive on mobile, well after doing that this is what the top now looks like;
This is what it looks like when I remove the Bootstrap code;
This is the code with out bootstrap on the image
<div class="header">
<div class="top-nav">
<div class="container">
<div class="row">
<img class="logo" src="<?php if($custom_logo){echo $custom_logo; }else{echo $avatar;} ?>">
<nav class="social-media-top">
<h1 class="col-xs-12">Hello, I am <span><?php echo $twitch_username; ?></span></h1>
<?php if($twitch_username){ ?>
<li><i class="fa fa-twitch"></i></li>
This is my css
/* Top Header */
.header {
padding-top: 1.5em;
border-top: solid .3em rgba(46, 204, 113, 1.0);
}
.top-nav {
margin-top: 1.2em;
margin-right: auto;
margin-bottom: .8em;
margin-left: auto;
width: 30em;
}
.logo {
float: left;
width: 5em;
height: 5em;
border: solid .1em rgba(46, 204, 113, 1.0);
border-radius: 50%;
}
.social-media-top {
float: right;
padding-bottom: 1em;
}
.social-media-top h1 {
margin: 0;
padding: 0;
color: #41eb71;
font-weight: 100;
font-size: 2em;
align-content: center;
}
.social-media-top h1 span {
color: #41eb71;
text-transform: capitalize;
font-weight: 600;
}
.social-media-top li {
display: inline-block;
}
.social-media-top li i {
display: inline-block;
width: 2em;
height: 2em;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
background-color: rgba(46, 204, 113, 1.0);
color: white;
text-align: center;
line-height: 2em;
}

Categories