bootstrap thumbnail and horizontal scroll bar in firefox and IE - html

I have an issue with bootstrap thumbnail and horizontal scrollbar in IE and Firefox but not chrome nor mobile browsers.
So basically, in firefox and IE the modals look strange and there is a horizontal scroll bar, however this issue does not appear in chrome or mobile phone browsers. as you see in the image, this is the issue
and this is how modals look like in firefox
and this is how it should look like without any issue as in chrome
and for the modal code here:
<div class="container" id="portfolio" >
<hr>
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="Text 101 WebBuild V1/Text 101 WebBuild V1.html" target="_blank"> <img src="images/text101.png" alt="..." class="image">
<div class="imgDescription">
<h3 class="img-content"><strong>Text 101</strong></h3>
<span class="modal-button" >
<img src="images/unity1.png" style="height:30px; width:30px;" > </span>
</div>
</a>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="landingPage.html" target="_blank"> <img src="images/myweb-app.png" alt="..." class="image">
<div class="imgDescription">
<h3 class="img-content" style="left:95px;"><strong>MyWebsite App</strong></h3>
<span class="modal-button" style="left:145px">
<img src="images/webdev.png" style="height:30px; width:auto;" > </span>
</div>
</a>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="#"> <img src="images/card3.jpg" alt="..." class="image">
<div class="imgDescription">
<h3 class="img-content"></h3>
<span class="modal-button"></span>
</div>
</a>
</div>
</div>
</div> <!-- portfolio end here -->
and the css used here:
.thumbnail {
position: relative;
display: inline-block;
}
.thumbnail .imgDescription {
position: absolute;
top: 4px;
left: 4px;
width: 98%;
height: 96%;
display: none;
color: #FFF;
-webkit-transition: opacity .25s ease;
-moz-transition: opacity .25s ease;
}
.thumbnail:hover .imgDescription {
display: block;
background: rgba(0, 0, 0, .6);
}
.thumbnail .imgDescription .img-content {
position: absolute;
top: 25%;
left:35%;
color:white;
}
.thumbnail .imgDescription .modal-button {
position: absolute;
top: 55%;
left:43%;
}
I just couldn't figure where the issue is I mean it runs noraml in chrome and phone browsers. any help with be much appreciated.

Your tags are out of place. Notice how you open an <a> tag then a <div> and a <span> but you close the </a> before the </span> and </div>. HTML requires proper nesting so before you close the </a> you need to close every tag under it. Try using this code for the portfolio HTML:
<div class="container" id="portfolio">
<hr>
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="Text 101 WebBuild V1/Text 101 WebBuild V1.html" target="_blank"> <img src="images/text101.png" class="image" width="100%">
<div class="imgDescription">
<h3 class="img-content"><strong>Text 101</strong></h3>
<span class="modal-button">
<img src="images/unity1.png" style="height:30px; width:30px;">
</span>
</div>
</a>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="landingPage.html" target="_blank"> <img src="images/myweb-app.png" alt="..." class="image" width="100%">
<div class="imgDescription">
<h3 class="img-content" style="left:95px;"><strong>MyWebsite App</strong></h3>
<span class="modal-button" style="left:145px">
<img src="images/webdev.png" style="height:30px; width:auto;">
</span>
</div>
</a>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<a href="#"> <img src="images/card3.jpg" alt="..." class="image" width="100%">
<div class="imgDescription">
<h3 class="img-content"></h3>
<span class="modal-button"></span>
</div>
</a>
</div>
</div>
</div>
</div>
Update: I also added width="100%" to the images for IE.

Related

Why is min-height:100vh not working on container?

I wanted the social media icons to be visible without scrolling. This has worked before, is there a reason it's not? It doesn't seem to be the images taking up space.
I placed min-height:100vh on .container, HTML and body tag I didn't see any results. I changed the size height images and that also didn't get my desired result.
html {
height: 100%;
}
body {
background-color: #e2e2e2;
font-family: "Montserrat", sans-serif;
font-weight: 500; }
/* min height */
.container {
white-space: nowrap;
min-height: 100vh;
}
<div class="container"><nav>
<div class="site_header">
<img alt="nav logo" class="logo" src="https://i.imgur.com/1SxQJfI.png">
<div class="right">
<div class="class_button">
<a class="">CLASSES</a>
</div>
<img alt="menu button" class="menu" src="https://i.imgur.com/beUooBz.png">
</div>
</nav>
<div id="slider">
<div class="slider_child" id="slider_child">
<div class="image_con" style="left: 50%; opacity: 1">
<img src="https://i.imgur.com/xvYImiF.png" class="img1" />
</div>
<div class="image_con" style="left: 40%; opacity: 0">
<img src="https://i.imgur.com/hYnjyMy.png" class="img2" />
</div>
<div class="image_con" style="left: 40%; opacity: 0">
<img src="https://i.imgur.com/kGZ5oCv.png" class="img3" />
</div>
</div>
<!--ARROW AND TEXT ISSUE -->
<a class="slidenext" onclick="nextSlide();">
<img src="https://i.imgur.com/GASeP9Y.png" class="arrow_icon" />
<div class="grow">GROW</div>
</a>
<a class="slideprev" onclick="prevSlide();"><img src="https://i.imgur.com/WLkS6Jk.png" class="arrow_icon" />
<div class="shift">SHIFT</div>
</a>
<div class="title_holder">
<div class="title lineheight">
IR
</div>
<div class="title lineheight">
REG
</div>
<div class="title">
ULAR
</div>
<div class="button">
<a class="learn_more">LEARN MORE</a>
</div>
</div>
</div>
<!-- footer social media and slideshow numbers-->
<p>
#follow us
</p>
<div class="footer">
<img src="https://i.imgur.com/rCkPv9i.png alt="instagram link" class="social_icons ig" />
<img src="https://i.imgur.com/9rmiZY1.png" alt="facebook link" class="social_icons" />
</div>
</div>
</div>
</div>
codepen
Change your slider image height to 630px. It should place the whole container within 100vh. #slider { height: 630px }. Another tip: If you are using flexbox. You don't need absolute positioning for footer in this case.

Menu logos are in the center of the div but not the titles - Bootstrap

I have been trying to create a responsive menu for the mobile browser of my site and it has four links. I have given 25% width for each of them. The problem is, although its logos stay center their titles don't. You can notice for the snippet that the titles are not in the center of their div.
What is the problem here? What am I doing wrong? Can you suggest how can I keep these titles center as well?
this is the current state:
I'm trying to make it something like this:
The snippet:
.menu {
position: fixed;
bottom: 0;
width: 100%;
background-color: #434A54;
color: white;
font-size: 12px;
padding-top: 7px;
}
a.main-link:link,
a.main-link:visited {
background-color: #434A54;
color: white;
text-decoration: none;
display: inline-block;
width: 25%;
}
.logo {
width: 24px;
height: 24px;
margin-left: auto;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container menu">
<div class="row">
<a href="start.html" class="main-link">
<div class="col-3"> <img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo"/> <br>
LINK1
</div>
</a>
<a href="calculator-home.html" class="main-link">
<div class="col-3"> <img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo"/> <br>
LINK222
</div>
</a>
<a href="contact.html" class="main-link">
<div class="col-3"> <img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo"/> <br>
LINK33333
</div>
</a>
<a href="about.html" class="main-link">
<div class="col-3"> <img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo"/> <br>
LINK4444444
</div>
</a>
</div>
</div>
Columns should be direct child of rows.
Add text center class to the columns. Put the anchor tag inside of columns and make it display:block. And the image and menu title should be placed inside the anchor tag.
/*This css is not required. */
img{
width:25px;
height:25px;
}
a.main-link:link,
a.main-link:visited {
text-decoration: none;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-3 text-center">
<a href="start.html" class="main-link d-block">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo " />
<div> LINK1 </div>
</a>
</div>
<div class="col-3 text-center">
<a href="start.html" class="main-link d-block">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo " />
<div> LINK1 </div>
</a>
</div>
<div class="col-3 text-center">
<a href="start.html" class="main-link d-block">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo " />
<div> LINK1 </div>
</a>
</div>
</div>
</div>
If you change the html code and add the image before the text inside the anchor tag then add text-align: center you'll get the same result
check my code:
.menu {
position: fixed;
bottom: 0;
width: 100%;
background-color: #434A54;
color: white;
font-size: 12px;
padding-top: 7px;
}
.main-link {
text-align: center
}
a.main-link:link,
a.main-link:visited {
background-color: #434A54;
color: white;
text-decoration: none;
display: inline-block;
width: 25%;
}
.logo {
width: 24px;
height: 24px;
margin-left: auto;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container menu">
<div class="row">
<a href="start.html" class="main-link">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo" /><br />
<span class="col-3">LINK1
</span>
</a>
<a href="calculator-home.html" class="main-link">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo" /> <br>
<span class="col-3">LINK222
</span>
</a>
<a href="contact.html" class="main-link">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo" /> <br>
<span class="col-3">LINK33333
</span>
</a>
<a href="about.html" class="main-link">
<img src="http://diylogodesigns.com/blog/wp-content/uploads/2016/04/google-logo-icon-PNG-Transparent-Background.png" class="logo" /><br />
<span class="col-3">LINK4444444
</span>
</a>
</div>
</div>

One page site - images overflow on responsive versions

I've put together a one page site but am having problems with the top section.
It's fine on a desktop, but on any other device the three main photographs on the section stack, instead of the section expanding to allow this, the images just overflow (or are hidden if using overflow hidden property).
I'm not sure what the issue is that's causing this and would be grateful for your guidance.
Here's the html:
<!-- Jumbotron -->
<section class="jumbotron" id="header">
<div class="container">
<div class="main-photo" id="header-photo">
</div>
<div class="transparent-box" style="padding-top: 3%;">
<img src="images/logo.png" style="width: 100%;"></img>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-1" style="padding-top:5%">
<div class="row">
<div class="col-md-3 col-sm-offset-1">
<figure class="round-outline">
<img class="round-photo img-responsive" src="assets/photo1-sm.jpg" alt="">
<div class="round-caption-bg"></div>
</figure>
</div>
<div class="col-md-3">
<figure class="round-outline">
<img class="round-photo img-responsive" src="assets/photo2-sm.jpg" alt="">
<div class="round-caption-bg"></div>
</figure>
</div>
<div class="col-md-3">
<figure class="round-outline">
<img class="round-photo img-responsive" src="assets/photo3-sm.jpg" alt="">
<div class="round-caption-bg"></div>
</figure>
</div>
</div>
<div class="row">
<a href="#quote-one" style="color: #d5b17c;">
<i class="fa fa-chevron-down fa-2x pulsate-opacity chevron"></i>
</a>
</div>
</div>
</div>
</div>
</section>
<!-- End of Jumbotron -->
and the css:
/* ==========================================================================
Jumbotron Section
========================================================================== */
.jumbotron {
padding: 100px 0 60px;
margin-top: 0;
margin-bottom: 0;
background: transparent url('../images/black-red-background.jpg') no-repeat top center;
background-size: auto auto;
background-attachment: fixed;
font-size: 1em;
height: auto;
overflow: hidden;
}
.jumbotron .container {
text-align: center;
}
If I understood correctly then the problem is your col-md classes cause breakpoints at the MD size which is tablets lower.
Change <div class="col-md-3 col-sm-offset-1"> to <div class="col-xs-4">
And the other 2 <div class="col-md-3" also to <div class="col-xs-4">
Is that what you want?

How to do auto slide for divs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have three main div for movie poster. I want that three div to auto slide and also want left and right navigation button. How can it be done?
HTML Code
<div class="movie-review">
<div class="single-movie">
<img src="style.jpg" width="250" >
<div class="description">
<span class="movie_title">Movie Title</span><hr>
<span class="rating">Rating:</span>
</div>
</div>
<div class="single-movie">
<img src="rasputin.jpg" width="250" >
<div class="description">
<span class="movie_title">Movie Title</span><hr>
<span class="rating">Rating:</span>
</div>
</div>
<div class="single-movie">
<img src="spirit.jpg" width="250" >
<div class="description">
<span class="movie_title">Movie Title</span><hr>
<span class="rating">Rating:</span>
</div>
</div>
</div>
CSS Code
.single-movie {width:250px; height:370px; float:left;}
.single-movie img {position:absolute; -webkit-transition: 0.4s ease; transition: 0.4s ease;}
.single-movie img:hover {-webkit-transform: scale(1.08); transform: scale(1.08);}
.description {background:rgba(0,0,0,0.9); color:#fff; padding:5px 9px; position:relative; top:290px;}
.movie_title {font-size:22px;}
.rating {color:#ff6000; font-size:18px;}
You can do that with slick slider. Here is my codepen link
$('.movie-review').slick();
You can do this with Bootstrap carousel
$(document).ready(function() {
$('#media').carousel({
pause: true,
interval: false,
});
});
/* carousel */
.media-carousel
{
margin-bottom: 0;
padding: 0 40px 30px 40px;
margin-top: 30px;
}
/* Previous button */
.media-carousel .carousel-control.left
{
left: -12px;
background-image: none;
background: none repeat scroll 0 0 #222222;
border: 4px solid #FFFFFF;
border-radius: 23px 23px 23px 23px;
height: 40px;
width : 40px;
margin-top: 30px
}
/* Next button */
.media-carousel .carousel-control.right
{
right: -12px !important;
background-image: none;
background: none repeat scroll 0 0 #222222;
border: 4px solid #FFFFFF;
border-radius: 23px 23px 23px 23px;
height: 40px;
width : 40px;
margin-top: 30px
}
/* Changes the position of the indicators */
.media-carousel .carousel-indicators
{
right: 50%;
top: auto;
bottom: 0px;
margin-right: -19px;
}
/* Changes the colour of the indicators */
.media-carousel .carousel-indicators li
{
background: #c0c0c0;
}
.media-carousel .carousel-indicators .active
{
background: #333333;
}
.media-carousel img
{
width: 250px;
height: 100px
}
/* End carousel */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<h2>Media Slider Carousel BS3</h2>
</div>
<div class='row'>
<div class='col-md-8'>
<div class="carousel slide media-carousel" id="media">
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
<div class="col-md-4">
<a class="thumbnail" href="#"><img alt="" src="http://placehold.it/150x150"></a>
</div>
</div>
</div>
</div>
<a data-slide="prev" href="#media" class="left carousel-control">‹</a>
<a data-slide="next" href="#media" class="right carousel-control">›</a>
</div>
</div>
</div>
</div>
See Full Page Demo

Trying to get text to overlap circular image to behave upon resizing with bootstrap

I have a page where I'd like to have a row of circular images with text on them that can serve as links. I've figured out how to get this to work for the general case of a full sized webpage, but when I resize the width of the page, the text doesn't scale with the image because I have to use absolute positions. Here's the html:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
</div>
</div>
</body>
</html>
Here's the main.css page...
body {
max-width: 900px;
margin: 0 auto;
}
.container {
width: 100%;
}
.button-pic {
opacity: 0.4;
position: relative;
}
.button-caption {
text-align: center;
position: absolute;
top: 87px;
left: 85px;
}
I'd like to find a way to not have to set the top and left positions of the button-caption since not all of my labels will be the same length. Anyone have advice to offer?
If you want your text position to remain consistent to the image you'll need to use percentages instead of setting a fixed amount of pixels for the position since the images are responsive.
See working Snippet.
.content {
max-width: 900px;
margin: auto;
}
.button-pic {
opacity: 0.4;
position: relative;
margin: auto;
}
.button-caption {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Just a Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Just a Really Very Pretty Long Label for a Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">A Button</span>
</a>
</div>
</div>
</div>
</div>