CSS format carousel issue - html

I'm woring in this carousel, i'm using bootstram, and OWL Carousel : http://owlgraphic.com/owlcarousel
what i need to do is, make the clicked button taller, and in front of the image, like in the attached images.
HTML
<!-- owl carousol start -->
<div id="demo">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div id="sync1" class="owl-carousel">
<div class="item">
<h1>Atentos, despiertos, <br/> llenos de energía</h1>
<img src="images/slider.png"/>
</div>
<div class="item">
<h1>Atentos, despiertos, <br/> llenos de energía</h1>
<img src="images/slider.png"/></div>
<div class="item">
<h1>Atentos, despiertos, <br/> llenos de energía</h1>
<img src="images/slider.png"/></div>
<div class="item">
<h1>Atentos, despiertos, <br/> llenos de energía</h1>
<img src="images/slider.png"/></div>
<div class="item">
<h1>Atentos, despiertos, <br/> llenos de energía</h1>
<img src="images/slider.png"/></div>
</div>
<div id="sync2" class="owl-carousel">
<div class="item"><h1>Un nuevo amanecer</h1></div>
<div class="item"><h1>Conoce Expo Digital</h1></div>
<div class="item"><h1>Expo Priority</h1></div>
<div class="item"><h1>Expo Gold</h1></div>
<div class="item"><h1>Expo at work</h1></div>
</div>
</div>
</div>
</div>
</div>
And the CSS
#sync1 .item{
background: #0c83e7;
padding: 0px 0px;
margin: 0px;
color: #FFF;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-align: center;
}
#sync2 .item{
background: #fff;
padding: 10px 0px;
margin: 0px;
color: #FFF;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-align: center;
cursor: pointer;
border-radius:0px;
margin-left:-5px;
border-left:1px solid #91c04e;
border: 1px solid red;
}
#sync2 .item:nth-child(6){
border:0px;
}
#sync2 .item h1{
font-size: 18px;
font-family: HelveticaNeueLight;
color:#9ac55d ;
}
#sync2 .synced .item{
background: #9ac55d;
color: #fff;
}
#sync2 .synced .item h1{
color: #fff;
font-family: HelveticaNeueLight;
}
#sync1 .item h1{
font-family: HelveticaNeueLight;
font-style: italic;
position: absolute;
width: 98%;
text-align: right;
font-size: 48px;
}
#sync1 .item img{
width: 100%;
}
.owl-item .item img{
width:100%;
overflow:hidden;
}
.owl-theme .owl-controls .owl-buttons div{
display:none;
}
.owl-wrapper{
width:1000px;
}
.owl-theme .owl-controls{
margin:0px;
}
#sync2{
z-index:9999999999999;
margin-top:0px;
}
#sync2 .synced .item{
color:#1c6f42;
border-right:1px solid #91c04e;
height: 55px;
margin: -10px 0px 0px 0px;
z-index: 99999999;
}
#sync2 .item{
color:#91c04e;
height:45px;
}
#demo .full_width{
max-width:100%;
overflow:hidden;
}
#sync2 .item a:active{
color:red;
height:55px;
background-color: white;
margin: 10px 1px 1px 1px;
z-index: 9999999;
}
What i need is to get this button taller and in fron of the main image.
that's why i'm coming here, because i had not found a solution in other palce.
This is the way i'm doing it:
and this is the way i need it working.
So i'm trying a lot of cases, but i still don't found the way to do it.
thank you for your help!

In css3 you have the scale propertie :
.item:hover{
transform: scale(2);
}
will make the hovered item 2 times bigger.
.item a:active{
transform: scale(2);
}
Feel free to ask if needed

Related

About header-width,footer positon,the position of picture. My awful code doesn't work

I have a problem with my stupid and awful code.(HTML&CSS)
It's a copy of Airbnb's top page to study.
reference: https://www.airbnb.jp/host/homes?_set_bev_on_new_domain=1568702785_MTQxMDA4ZDc4ZmM0
1.header-width
Somehow, My header-size of width is very short.
I make it become longer the width of this site to 1050px.
so the [header-right] has to become align right.
2.footer positon
My footer stands around the center of the site somehow.
3.the position of picture
In the div class[host-voice-wrapper],
there is a picture(Emma) in the bottom.
But I want it to be the right of sentences.
1.check the original source code of Airbnb
1.
~HTML~
-----------
<header>
<div class="header-left">
<div class="header-logo">
<img src="./img/246x0w.jpg">
</div>
<div class="header-list">
<ul>
<li>概要</li>
<li>準備</li>
<li>安全</li>
<li>マネープラン</li>
</ul>
</div>
</div>
-----------
~CSS~
-----------
header{
height:60px;
padding: 10px 20px;
position:fixed;
z-index:10;
background-color: white;
}
.header-left{
float:left;
display:flex;
}
.header-logo img{
width:50px;
}
.header-list li{
float:left;
padding-right:30px;
font-weight:bold;
}
.header-list li:hover{
border-bottom:1px solid #7f7f7f;
}
.header-right{
float:right;
}
.expect-income{
}
.amount{
font-size:25px;
font-weight:bold;
}
.start{
padding:10px 15px;
background-color:#dc143c;
color:white;
border-radius:5px;
margin:10px;
}
.start:hover{
cursor:pointer;
transition:0.3s;
}
-----------
2.
~HTML~
-----------
<footer>
<img class="footer-logo" src="./img/246x0w.jpg">
<a>
Airbnb Global Services Limited
観光庁長官(01)第S0001号(2018年6月15日-2023年6月14日)
© 2019 Airbnb, Inc. All rights reserved.</a>
</footer>
-----------
~CSS~
-----------
footer{
height:40px;
border-top:1px solid #808080;
padding:10px 0 30px 20px;
}
.footer-logo{
width:20px;
}
footer a{
font-size:15px;
}
-----------
3.
~HTML~
-----------
<div class="host-voice-wrapper">
<div class="container">
<div class="contents">
<div class="voice">
<i class="fas fa-quote-left fa-2x my-orange"></i>
<br></br>
<a class="voice-text">「ホスト保証」があったからAirbnb参加を決めたといっても過言でないほどで、被害やトラブルがあったときに頼れるサポートがあるのは本当にありがたいですね。</a>
<br>
<a class="host-introduce">Emmaさんはロンドンのホスト。自由度の高さに魅力を感じています</a>
<br>
<a class="btn example">ホスト実践例をチェック</a>
</div>
<div class="Emma">
<img src="./img/Emma.jpg">
</div>
</div>
-----------
~CSS~
-----------
.host-voice-wrapper{
margin-top:100px;
}
.contents{
float:left;
}
.voice{
width:40%;
}
.voice-text{
font-size:30px;
}
.host-introduce{
color:#808080;
}
.example{
padding:15px 20px;
border:2px solid #404040;
border-radius:5px;
margin-top:20px;
}
.Emma{
width:400px;
}
-----------
Can you please check this code. hope it will work for you.
body {
margin: 0px;
padding: 80px 0px;
}
.container {
width: 1170px;
margin: 0 auto;
padding: 0px 15px;
}
header {
height: 60px;
padding: 10px 20px;
position: fixed;
left: 0;
top: 0;
width: 100%;
;
z-index: 10;
background-color: white;
}
.header-left {
float: left;
display: flex;
}
.header-logo img {
width: 50px;
}
.header-list li {
float: left;
padding-right: 30px;
font-weight: bold;
}
.header-list li:hover {
border-bottom: 1px solid #7f7f7f;
}
.header-right {
float: right;
}
.amount {
font-size: 25px;
font-weight: bold;
}
.start {
padding: 10px 15px;
background-color: #dc143c;
color: white;
border-radius: 5px;
margin: 10px;
}
.start:hover {
cursor: pointer;
transition: 0.3s;
}
footer {
height: 40px;
}
.footer-logo {
margin-right: 10px;
width: 20px;
}
footer a {
font-size: 15px;
}
.host-voice-wrapper {
padding: 80px 0px;
}
.footer-content {
border-top: 1px solid #808080;
padding: 10px 0 20px;
}
.footer-content,
.contents {
display: flex;
display: -webkit-flex;
align-items: center;
}
.voice {
width: 40%;
}
.voice-text {
font-size: 30px;
}
.host-introduce {
color: #808080;
}
.example {
padding: 15px 20px;
border: 2px solid #404040;
border-radius: 5px;
margin-top: 20px;
display: inline-block;
}
.Emma {
width: 50%;
text-align: center;
}
<header>
<div class="header-left">
<div class="header-logo">
<img src="https://image.shutterstock.com/image-illustration/logo-g-letter-on-white-260nw-497276758.jpg">
</div>
<div class="header-list">
<ul>
<li>概要</li>
<li>準備</li>
<li>安全</li>
<li>マネープラン</li>
</ul>
</div>
</div>
</header>
<div class="host-voice-wrapper">
<div class="container">
<div class="contents">
<div class="voice">
<i class="fas fa-quote-left fa-2x my-orange"></i>
<br></br>
<a class="voice-text">「ホスト保証」があったからAirbnb参加を決めたといっても過言でないほどで、被害やトラブルがあったときに頼れるサポートがあるのは本当にありがたいですね。</a>
<br>
<a class="host-introduce">Emmaさんはロンドンのホスト。自由度の高さに魅力を感じています</a>
<br>
<a class="btn example">ホスト実践例をチェック</a>
</div>
<div class="Emma">
<img src="https://image.shutterstock.com/image-illustration/logo-g-letter-on-white-260nw-497276758.jpg">
</div>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="footer-content">
<img class="footer-logo" src="https://image.shutterstock.com/image-illustration/logo-g-letter-on-white-260nw-497276758.jpg">
<a>
Airbnb Global Services Limited <br>
観光庁長官(01)第S0001号(2018年6月15日-2023年6月14日) <br>
© 2019 Airbnb, Inc. All rights reserved.
</a>
</div>
</div>
</footer>

Affect only one div among 3 divs having the same properties after hover effect

I have been working on this project for a while and it works fine but when I implement it, it stops working:
.carousel-promo {
font:normal 14px sans-serif;
position:relative;
}
.carousel-promo.item{
position: absolute;
top: 0;
left: 0;
}
.carousel-promo button{
border-radius: 2px;
background-color: #87bae1;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
border: 0;
color: #ffffff;
font-weight: bold;
font-size: 13px;
cursor: pointer;
margin: 10px 0 0 10px;
width: 95px;
height: 32px;
z-index:20;
}
.carousel-promo .product-out-of-stock{
color: #c15017;;
font-weight: bold;
line-height: 55px;
margin: 10px 0 0 10px;
width: 95px;
height: 32px;
z-index:20;
position:relative;
}
.carousel-promo .product-price{
float: right;
margin: 10px 10px 0 0;
font-weight: bold;
font-size: 15px;
padding-top: 6px;
z-index:20;
}
.carousel-promo .product-price .price-old{
text-decoration: line-through;
color: #888888;
}
.carousel-promo .product-price .price-old{
color: #ee001c;
}
.carousel-promo .sale_badge{
position:absolute;
z-index:2;
width:60px;
height:60px;
transition: all 150ms ease-in-out 0s;
border-radius: 0 0 30px 0;
line-height:60px;
box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);
font-size:14px;
color:#ffffff;
background-color:#83d4fb;
text-align:center;
}
.carousel-promo > div:hover .sale_badge {
width:70px;
height:70px;
line-height:70px;
}
<div class="carousel-promo">
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="https://placehold.it/300x150" alt="" /></div>
</div>
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="https://placehold.it/300x150" alt="" /></div>
</div>
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="https://placehold.it/300x150" alt="" /></div>
</div>
</div>
After running the snippet, when you will over a div, the size of the price tag of that specific div will increase.
Once I implement it, when I hover one div, all the price tag increase.
I am using owlcarousel to slide the item and my original html code is the following (the CSS is the same as what I have been working with since):
<div class="container-promo">
<h3>Article en promotion</h3>
<div class="carousel-promo">
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="images/13.jpg" alt="" /></div>
</div>
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="images/14.jpg" alt="" /></div>
</div>
<div class="item">
<div class="sale_badge">-20%</div>
<div class="image"><img src="images/15.jpg" alt="" /></div>
</div>
</div>
</div>
Kindly help me solve this problem.
Sorry I am not a native english speaker, I am trying my best.
That's because you are targeting div tag on hover, while owl-carousel adds some wrapper divs as well. So, logically when ever we hover over a div code works and all price tags shows up. You may have to target your price tags in this specific way so that only .item class hover takes that css effect. So, change you last css code line
.carousel-promo > div:hover .sale_badge {
width:70px;
height:70px;
line-height:70px;
}
with following code which is just a bit changed than yours
.carousel-promo > div.item:hover .sale_badge {
width:70px;
height:70px;
line-height:70px;
}
And so, exact price tags will be shown on hover.

Boostrap side by side grid, in fixed space

I'm trying to pack the pictures in
<div class="social block"> ... </div>
appear to be side by side, like a grid. I'm also trying to make it completely fluid, and self-adjusting (hence Bootstrap).
I want two make a total of two rows that will have 3 icons in each, with all of the images touching on the sides.
It currently looks like this: http://postimg.org/image/z0g80wf0z/
Here is my CSS:
// Place all the styles related to the Pages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
p{
color: rgb(51, 51, 51);
display: block;
font-family: Roboto, sans-serif;
font-size: 21px;
font-weight: 100;
height: 90px;
line-height: 30px;
margin-bottom: 10px;
margin-left: 0px;
margin-right: 0px;
margin-top: 30px;
text-align: center;}
p, h1 { margin: 0 }
html {
position:relative;
height:100%;
width:100%;
}
html,body
{
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
body {
position:absolute;
min-width:100%;
min-height:100%;
}
.window {
height:700px;
width:100%;
//border-top: solid 1px #000; //temp test
}
.full{
width:100%;
}
.main-home {
background: url('http://i58.tinypic.com/2v34yub.jpg') no-repeat center center;
background-size:cover;
}
.main-about {
background: url('https://static.pexels.com/photos/1440/city-road-street-buildings.jpg') no-repeat center center;
background-size:cover;
}
.window-support {
padding: 80px 0;
text-align: center;
}
.content {
top:225px;
position:relative;
text-align: center;
color: white;
}
h1.headline {
font-family: 'Roboto', sans-serif;
font-weight: 100;
font-size: 50px;
}
h2.headline {
font-family: 'Roboto', sans-serif;
font-weight: 100;
font-size: 35px;
}
.btn.sharp {
border-radius:0;
border:none;
font-size: 14px;
}
.menu-icon {
top:30px;
left:30px;
position:absolute;
margin: 0;
}
.col-centered{
float: none;
margin: 0 auto;
}
.halfBack {
width: 50%;
height:500px;
}
.grid-text {
padding-top:205px;
}
.text-background {
height: 2em;
width: 100%;
background-color:#000;
line-height:2em;
vertical-align:middle;
text-align:center;
opacity:0.7;
}
#footer {
background-color: #f9f9f9;
border-top: solid 1px #F5F5F5;
height:50px;
text-align: center;
line-height:50px;
vertical-align:middle;
color: #ccc;
position:absolute;
bottom:-50px;
width:100%;
}
#abt-grid-3 {
background: url('https://paulkporterphotography.files.wordpress.com/2015/04/20141210-distillery-31.jpg') no-repeat center center;
height:500px;
background-size:cover;
border: solid 2px #F5F5F5;
}
#abt-grid-1{
background:url('https://i0.wp.com/upload.wikimedia.org/wikipedia/commons/1/14/1_yonge_street_toronto_winter_2010_panorama.jpg') no-repeat center center;
height:500px;
background-size:cover;
border: solid 2px #F5F5F5;
}
#abt-grid-2{
background: url('http://ryersonbuilds.ryerson.ca/wp-content/uploads/2013/12/X6C61871.jpg') no-repeat center center;
height:500px;
border: solid 2px #F5F5F5;
background-size:cover;
}
#leftHalf {
background: url(images/bg-1.jpg);
width: 70%;
position: absolute;
left: 0px;
height: 100%;
}
#rightHalf {
background: url(images/bg-2.jpg);
width: 30%;
position: absolute;
right: 0px;
height: 100%;
}
.socialBlock{
border: solid 1px #CCC;
height: 300px;
width:100%;
}
.edgeWrap {
margin:0px;
padding:0;
width:100%;
}
.socialBlock {
.row {border:solid 1px #000;}
.col-md-4 {}
.container{width:auto;}
}
Here is the html:
<!DOCTYPE html>
<html>
<!-- start page -->
<div id="leftHalf" class="halfBack">
<div class="window main-home">
<div class="container edgeWrap">
<!-- content -->
<div class="row">
<div class="content col-md-12">
<h1 class="headfont text-center white" data-sr="flip 65deg over 2s" >Hi, I'm Satchel.</h1>
<p data-sr="flip 65deg over 2s"> <%= link_to 'About Me', '/about', class:'btn btn-primary sharp btn-lg', role:'button' %>
<%= link_to 'The Blog', '/blog', class:'btn btn-primary sharp btn-lg', role:'button', target:'_blank' %>
</p>
</div>
</div>
</div>
</div>
</div>
<div id = "rightHalf" class="halfBack">
<div class="container edgeWrap">
<div class="row">
<div class="col-md-12">
<div class="socialBlock">
<div class="container">
<div class="row">
<div class="col-md-4"> <%= image_tag('icon/youtube-play.png',class:'img-responsive') %> </div>
<div class="col-md-4"> <%= image_tag('icon/twitter.png', class:'img-responsive') %> </div>
<div class="col-md-4"> <%= image_tag('icon/twitter.png', class:'img-responsive') %> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</html>
It's a little weird, because I'm trying to do a split (originally two halves now 3/10 and 7/10).
Any help is appreciated!
Satchel Hi there.
Have a look at this Fiddle to see if it helps you here.
I just tried to simplify this a bit, so if you wanted to run the Bootstrap way here.
You can always see how this works and replace the col-xs-xx with you own css. If you do not want to use Bootstrap.
You said you are wanting to have two rows each with 3 images all touching.
I did that this way.
<div class="col-xs-3">
<div class="row">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
</div>
<div>
<div class="row padtop">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
<img src="http://www.freelargeimages.com/wp-content/uploads/2015/05/Twitter_Logo_Hd_Png_03.png" class="col-xs-4 no-pad-marg">
</div>
</div>
</div>

Five Buttons with Overlapping text

I'm building the following (see image). Basically, I need 5 buttons with overlapping buttons (each with numbers) on the top. However, I'm unsure how to go about this?
One solution:
https://jsfiddle.net/ryd5e51n/
<div class="button">
<div class="button-top"><span class="text">1</span></div>
<div class="button-bottom"></div>
</div>
.button
{
display: table;
}
.button-top
{
background-color: black;
width: 36px;
height: 36px;
border-radius: 18px;
margin: auto;
position: relative;
z-index: 2;
box-shadow: 0px 0px 2px 2px #bbbbbb;
color: white;
text-align: center;
}
.text
{
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
}
.button-bottom
{
background-color: #efefef;
width: 100px;
height: 90px;
margin-top: -15px;
position: relative;
z-index: 1;
border: 2px solid #bbbbbb;
border-radius: 20px;
}
You can do this with a single element:
HTML:
<div class="button">
</div>
<div class="button">
</div>
<div class="button">
</div>
<div class="button">
</div>
<div class="button">
</div>
CSS:
div.button {
display:block;
float:left;
margin:18px 5px 0;
position:relative;
overflow:visible;
background:none #efefef;
width:100px;
height:100px;
border:2px solid #ccc;
border-radius:10px;
counter-increment: button;
}
div.button:before {
content:counter(button);
display:block;
padding:8px 14px;
background:none #000;
border:2px solid #ccc;
border-radius:100px;
color:#fff;
position:absolute;
left:50%;
top:-18px;
transform: translateX(-50%);
}
See fiddle: https://jsfiddle.net/jj2nk5f1/2/
Here it is.
.button {
float: left;
margin-left: 10px;
}
.number {
width: 20px;
height: 20px;
border-radius: 10px;
background-color: black;
margin-left: 15px;
}
.block {
width: 50px;
height: 50px;
border: 1px solid black;
margin-top: -10px;
}
<div class="button">
<div class="number"></div>
<div class="block"></div>
</div>
<div class="button">
<div class="number"></div>
<div class="block"></div>
</div>
<div class="button">
<div class="number"></div>
<div class="block"></div>
</div>
<div class="button">
<div class="number"></div>
<div class="block"></div>
</div>
<div class="button">
<div class="number"></div>
<div class="block"></div>
</div>

Create a box with border on twitter bootstrap using css3

I am trying to create a responsive box in twitter bootstrap exactly like this:
Now, I have created a coloumn:
<div class="col-lg-4" style="border-style: solid;">
<h2>Title</h2>
<p>Data</p>
</div>
Giving border to all of this doesn't work. What would be the best way fellas?
Something like this maybe? Demo
HTML
<div class="row">
<div class="col-lg-4">
<h2 class="title">Python Native Datatypes</h2>
<div class="box">
<ul>
<li>Data</li>
<li>Data</li>
<li>Data</li>
</ul>
</div>
</div>
CSS
.box {
border: solid 1px #000;
padding: 10px;
z-index:0;
position: relative;
width:90%;
margin: -20px auto 0 auto;
}
.box li {
list-style: none;
}
.title {
background:green;
z-index:1;
position: relative;
padding: 5px;
text-align:center;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
color: #fff;
font-weight: 200;
}