Why is my text not in
"Text overflow: ellipsis"?
I want my text to be directly in ellipsis and the excess text to be hidden when the containers slide.
You can find my code attached.
Thank you for help.
http://jsfiddle.net/5gLtraxh/12/
.wrapper {
position: relative;
overflow: hidden;
width: 400px;
height: 100px;
border: 1px solid black;
}
.description{ overflow:hidden;
text-overflow: ellipsis;
}
.description2{
white-space: nowrap;
overflow:hidden;
text-overflow: ellipsis;
}
.price{
position: absolute;
right: 0;
bottom: 0;
width: 100px;
height: 100%;
background: green;
transition: 1s;
}
.slide {
position: absolute;
right: -100px;
bottom: 0;
width: 100px;
height: 100%;
background: blue;
transition: 1s;
}
.wrapper:hover .slide {
transition: 1s;
right: 0;
}
.wrapper:hover .price {
transition: 1s;
right: 100px;
}
<div class="wrapper">
<h4 class="description">Lorem ipsum dolor sit amet, consectetur</h4>
<p class="description2">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae nulla
</p>
<span class="price"></span>
<div class="slide"></div>
</div>
You cannot use position: absolute in this case since it will make the <div> no longer takes up any space. You can position them with float for example:
.wrapper {
position: relative;
overflow: hidden;
width: 400px;
height: 100px;
border: 1px solid black;
}
.description
{
white-space: nowrap; /*I am guessing you want this*/
overflow:hidden;
text-overflow: ellipsis;
}
.description2
{
white-space: nowrap;
overflow:hidden;
text-overflow: ellipsis;
}
.price
{
float: right;
width: 100px;
height: 100%;
background: green;
transition: 1s;
}
.slide {
float: right;
width: 0px;
height: 100%;
background: blue;
transition: 1s;
}
.wrapper:hover .slide {
transition: 1s;
width: 100px;
}
.wrapper:hover .price {
transition: 1s;
right: 100px;
}
<div class="wrapper">
<div class="slide"></div>
<span class="price"></span>
<h4 class="description">Lorem ipsum dolor sit amet, consectetur</h4>
<p class="description2">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae nulla nihil fugit debitis assumenda reiciendis ab velit cupiditate blanditiis perspiciatis hic itaque reprehenderit, enim officia iusto, sint quod modi architecto!
</p>
</div>
Flexbox solution:
.wrapper {
display: flex;
overflow: hidden;
width: 400px;
height: 100px;
border: 1px solid black;
justify-content: space-between;
}
.description-wrapper {
min-width: 0;
}
.slider-wrapper {
display: flex;
}
.description
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.description2
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.price
{
flex-shrink: 0;
width: 100px;
height: 100%;
background: green;
transition: 1s;
}
.slide {
flex-shrink: 0;
width: 0px;
height: 100%;
background: blue;
transition: 1s;
}
.wrapper:hover .slide {
transition: 1s;
width: 100px;
}
.wrapper:hover .price {
transition: 1s;
}
<div class="wrapper">
<div class="description-wrapper">
<h4 class="description">Lorem ipsum</h4>
<p class="description2">
Lorem ipsum dolor sit amet</p>
</div>
<div class="slider-wrapper">
<span class="price">sd</span>
<div class="slide"></div>
</div>
</div>
Hi i noticed when i collapse the text the code is not working as expected. Items are no longer at the end of the wrapper.
As you can see in the code below.
.wrapper {
display: flex;
overflow: hidden;
width: 400px;
height: 100px;
border: 1px solid black;
}
.description-wrapper {
min-width: 0;
}
.description
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.description2
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.price
{
flex-shrink: 0;
width: 100px;
height: 100%;
background: green;
transition: 1s;
}
.slide {
flex-shrink: 0;
width: 0px;
height: 100%;
background: blue;
transition: 1s;
}
.wrapper:hover .slide {
transition: 1s;
width: 100px;
}
<div class="wrapper">
<div class="description-wrapper">
<h4 class="description">Lorem ipsuctetur</h4>
<p class="description2">
Lorem ipsum dolor sit ame</p>
</div>
<span class="price">33$</span>
<div class="slide"></div>
</div>
Related
As it's quite difficult to explain, I'll show you an image of what I pretend.
The problem is not the "triangle", but the image background to be shown in that "space" that triangle generates.
Here is my approach, how to deal with this task. I use pseudo elements :before and :after with transform: skewX(deg) and border-left properties.
Here is code snippet:
.bg-arrow {
display: flex;
justify-content: flex-end;
background:url('http://wallpaperlepi.com/wp-content/uploads/2014/10/Stone-And-Star-Wallpaper.jpg') #ddd center center no-repeat;
background-size: cover;
}
.arrow-shape{
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
width: 200px;
height: 100px;
background-color: #fff;
}
.arrow-shape:before,
.arrow-shape:after{
content: '';
position: absolute;
left: 0;
height: 50%;
width: 100%;
background-color: #fff;
border-left: 4px solid #000;
z-index: 1;
}
.arrow-shape:before {
top: 0;
transform: skewX(15deg) translateX(-30px);
}
.arrow-shape:after {
transform: skewX(-15deg) translateX(-30px);
bottom: 0;
}
.arrow-shape .text {
position: relative;
text-align: center;
z-index: 2;
}
<div class="bg-arrow">
<div class="arrow-shape">
<div class="text">
Lorem ipsum dolor sit amet consectetur.
</div>
</div>
</div>
Here is another idea with one element, multiple background and less of code:
.box {
padding: 50px 30px;
text-align: right;
background-image:
linear-gradient(60deg,transparent 70%,#000 70%,#000 71%,#fff 71%),
linear-gradient(120deg,transparent 70%,#000 70%,#000 71%,#fff 71%),
url(https://picsum.photos/2000/1000?image=1069);
background-position:top right,bottom right,center;
background-size:600px 50%,600px 50%,cover;
background-repeat:no-repeat;
}
<div class="box">
some text here<br> more text
</div>
Hi guys I have a problem. I want show just normal my text on the image. When I do mouseover should be change image opacity except my text and png icon, it's should be seen normal (without opacity ).Like that.Thanks http://demo.digipieces.com/gusteau-html/menu-1.html
.foodMenu {
text-align: center;
height: 210px;
width: 280px;
position: relative;
}
.foodMenu:after {
content:'\A';
position:absolute;
background:rgba(0,0,0,0.6);
opacity:0;
transition: all 0.5s;
-webkit-transition: all 0.5s;
top:0;
left:0;
width:100%; height:100%;
}
.foodMenu:hover:after {
opacity: 1;
}
.foodMenu .menuTitle {
font-weight: 300;
font-size: 32px;
text-align: center;
text-transform: none;
position: absolute;
bottom:30px;
left:0;
right:0;
transition:all 0.4s ease-in-out;
-webkit-transition:all 0.4s cubic-bezier(x1,y1,x2,y2);
text-rendering: optimizelegibility;
opacity: 0;
}
.foodMenu:hover .menuTitle {
opacity: 1;
bottom: 70px;
}
.foodMenu .curve {
text-align: center;
text-transform: none;
position:absolute;
bottom:70px;
left:120px;
right:0;
opacity:0;
transition:all 0.4s ease-in-out;
-webkit-transition:all 0.4s;
}
.foodMenu:hover .curve {
opacity: 1;
}
<div class="col span-1-of-4 step_box">
<div class="foodMenu js-wp-2">
<img src="http://lorempixel.com/output/food-q-c-280-210-1.jpg" alt="our menu meal">
<h3 style="color:#ffffff;" class="menuTitle">Meals</h3>
<img src="img/curve.png" alt="curve" class="curve">
</div>
</div>
I am trying to get an overlay over some images I have tried so many ways and I can't seem to get it over the image. The overlay either goes above or below, but won't go over the image. any help would be awesome!
Here is my code:
.friend-profiles {
font-family: "Lora", serif;
width: 52%;
padding-top: 15px;
}
.title-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding: 0 10px;
text-align: center;
width: 100%;
border: 1px solid #dedede;
box-shadow: -1px 1px 3px 0 rgba(0, 0, 0, 0.1);
outline: none;
height: 35px;
}
.sort {
border: 1px solid #272727;
padding: 1px 10px;
font-size: 8px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 1px;
text-overflow: '';
border-radius: 0;
}
.sort:focus {
outline: none;
}
.friends-list{
display: flex;
justify-content: space-between;
flex-flow: row wrap;
}
.friend-profilePic {
margin-bottom: 15px;
width: 200px;
height: 150px;
}
.box {
width: 200px;
height: 150px;
box-shadow:inset 1px 1px 40px 0 rgba(0,0,0,.45);
border-bottom:2px solid #fff;
border-right:2px solid #fff;
margin:5% auto 0 auto;
background-size:cover;
overflow:hidden;
}
.overlay { background:rgba(0,0,0,.75);
text-align:center;
padding:45px 0 66px 0;
opacity:0;
-webkit-transition: opacity .25s ease;}
.box:hover .overlay {
opacity:1;}
<div class="friend-profiles">
<nav class="title-header">
<a ui-sref="friend-search"><img src="/images/Icons/Search.svg"></a>
<input class="search-friends" type="text" placeholder="Search For Friends" onfocus="this.placeholder=''" onblur="this.placeholder = 'Search For Friends'">
</nav>
<div class="friends-list">
<div ng-repeat="results in userResults">
<img ng-src="{{results.profileUrl}}" class="friend-profilePic">
<div class="box">
<div class="overlay">
<p>test</p>
</div>
</div>
</div>
</div>
</div>
I have added some element and style, that .box position to absolute.
.friend-profiles {
font-family: "Lora", serif;
width: 52%;
padding-top: 15px;
}
.title-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding: 0 10px;
text-align: center;
width: 100%;
border: 1px solid #dedede;
box-shadow: -1px 1px 3px 0 rgba(0, 0, 0, 0.1);
outline: none;
height: 35px;
}
.sort {
border: 1px solid #272727;
padding: 1px 10px;
font-size: 8px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 1px;
text-overflow: '';
border-radius: 0;
}
.sort:focus {
outline: none;
}
.friends-list{
display: flex;
justify-content: space-between;
flex-flow: row wrap;
}
.friend-profilePic {
width: 200px;
height: 150px;
}
.picture-wrapper {
position:relative;
overflow:hidden;
}
.box {
position:absolute;
top:0;left:0;
width: 100%;
height: 100%;
box-shadow:inset 1px 1px 40px 0 rgba(0,0,0,.45);
border-bottom:2px solid #fff;
border-right:2px solid #fff;
background-size:cover;
overflow:hidden;
}
.overlay { background:rgba(0,0,0,.75);
text-align:center;
padding:45px 0 66px 0;
opacity:0;
-webkit-transition: opacity .25s ease;
width:100%;height:100%;
}
.box:hover .overlay {
opacity:1;}
<div class="friend-profiles">
<nav class="title-header">
<a ui-sref="friend-search"><img src="/images/Icons/Search.svg"></a>
<input class="search-friends" type="text" placeholder="Search For Friends" onfocus="this.placeholder=''" onblur="this.placeholder = 'Search For Friends'">
</nav>
<div class="friends-list">
<div ng-repeat="results in userResults" class="picture-wrapper">
<img ng-src="{{results.profileUrl}}" class="friend-profilePic">
<div class="box">
<div class="overlay">
<p>test</p>
</div>
</div>
</div>
</div>
</div>
Your question in confusing but As much as I understood you want to show text or another image on image hover
Here is the code:
If it's not what meant tell me.
.hovereffect {
width: 100%;
height: 100%;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
}
.hovereffect .overlay {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
background-color: rgba(75,75,75,0.7);
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.hovereffect:hover .overlay {
background-color: rgba(48, 152, 157, 0.4);
}
.hovereffect img {
display: block;
position: relative;
}
.hovereffect h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
padding: 10px;
background: rgba(0, 0, 0, 0.6);
-webkit-transform: translateY(45px);
-ms-transform: translateY(45px);
transform: translateY(45px);
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.hovereffect:hover h2 {
-webkit-transform: translateY(5px);
-ms-transform: translateY(5px);
transform: translateY(5px);
}
.hovereffect a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
text-transform: uppercase;
color: #fff;
border: 1px solid #fff;
background-color: transparent;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
font-weight: normal;
margin: -52px 0 0 0;
padding: 62px 100px;
}
.hovereffect:hover a.info {
opacity: 1;
filter: alpha(opacity=100);
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.hovereffect a.info:hover {
box-shadow: 0 0 5px #fff;
}
<div style="width:350px; height:200px;">
<div class="hovereffect">
<img class="img-responsive" src="http://placehold.it/350x200" alt="">
<div class="overlay">
<h2>Hover effect</h2>
<a class="info" href="#">link here</a>
</div>
</div>
</div>
How to use images instead of text labels?
I need the menu to slide down when the .logo (bird) image button is clicked
How can I link text label with a logo image on the menu bar?
PS: the menu slides down when the .logo (bird) is clicked BUT there are two birds, I need the menu to slide down when the bird image sitting on the menu is clicked, AND yes I need only one bird image
/* ------------------------------------------ */
/* BASIC SETUP */
/* ------------------------------------------ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
/* ------------------------------------------ */
/* HEADER */
/* ------------------------------------------ */
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
/* ----- NAVIGATION -----*/
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
/* ----- LOGO -----*/
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
/* ----- MENU BUTTON -----*/
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
/* ------------------------------------------ */
/* PAGE CONTENT TOP BAR */
/* ------------------------------------------ */
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>
OK So I have found out all I needed to do was to replace
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
with
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
JSFiddle https://jsfiddle.net/heumnzLe/4/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>
I am creating a 'bookshelf' which contains books that use a CSS3 transform to rotateY onHover.
My problem is that after a few hovers, the page will resize and become much longer. I am only experiencing this problem in Firefox 12.0.
Example: http://jsfiddle.net/49KQk/
<div id="most-checked-out-books">
<div class="f1_container">
<div class="f1_card">
<div class="book front face">
<img src="books/new/harryPotter1.png" alt="Harry Potter (series)" />
</div>
<div class="back face center">
<em>Harry Potter (series)</em>
<br /><hr />
By: J.K. Rowling
<br /><hr />
Checked Out <b>425</b> Times
<br /><hr />
<i class="icon-share-alt"></i><br />Find in PolyCAT
</div>
</div>
</div> <!-- END CONTAINER -->
<div class="f1_container">
<div class="f1_card">
<div class="book front face">
<img src="books/new/ofMiceAndMen.png" alt="Of Mice and Men" />
</div>
<div class="back face center">
<em>Of Mice and Men</em>
<br /><hr />
By: John Steinbeck
<br /><hr />
Checked Out <b>201</b> Times
<br /><hr />
<i class="icon-share-alt"></i><br />Find in PolyCAT
</div>
</div>
</div> <!-- END CONTAINER -->
</div><!-- END MCO BOOKS -->
CSS
.f1_container {
height: 214px;
margin: 0px auto;
position: relative;
width: 140px;
z-index: 1;
display: inline-block;
padding: 0 13px 9px 13px;
}
.f1_container {
-moz-perspective: 1000px;
-webkit-perspective: 1000px;
-o-perspective: 1000px;
}
.f1_card {
-moz-transform-style: preserve-3d;
-moz-transition: all 0.5s linear 0s;
-webkit-transform-style: preserve-3d;
-webkit-transition: all 0.5s linear 0s;
-o-transform-style: preserve-3d;
-o-transition: all 0.5s linear 0s;
transform-style: preserve-3d;
transition: all 0.5s linear 0s;
height: 214px;
width: 140px;
}
.f1_container:hover .f1_card, .f1_container.hover_effect #f1_card {
-moz-transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
}
.f1_container:hover .face.back {
visibility: visible\9;
height: 214px\9;
width: 155px\9;
}
.face {
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
height: 100%;
position: absolute;
width: 100%;
background-color: blue;
}
.face.back {
-moz-box-sizing: border-box;
-moz-transform: rotateY(180deg);
-webkit-box-sizing: border-box;
-webkit-transform: rotateY(180deg);
-o-box-sizing: border-box;
-o-transform: rotateY(180deg);
box-sizing: border-box;
transform: rotateY(180deg);
background-color: white;
padding-top: 5px;
color: #333;
display: block;
text-align: center;
font-family: "MyriadProRegular", sans-serif;
/* IE HACK */
visibility: hidden\9;
}
.back hr {
width: 50%;
margin-bottom: 10px;
}
.back i {
font-size: 25px;
}
.back a {
font-size: 20px;
text-decoration: none;
}
.back a:visited {
color: blue;
}
.book {
cursor: pointer;
}
.book img {
height: 214px;
width: 140px;
}
You can see after just one or two hovers the entire page resizes and the scrollbar gets smaller. Any ideas how to fix this bug?
Glen