Different CSS results on Chrome and Firefox - css

I have this page with books and animated authors names. Theres around 35 books on the page.
http://kutsalkitap.org/kaynaklar/
When you get your mouse on a book, name of the author fades in and goes down slowly. It look perfect on chrome but, on mozilla, names goes way more down than it should be. Passes through the other books section.
I tried a few things but couldn't managed to fix it. Can someone help me?
Here is my css:
<style>
#nav li.parent {
margin-left: 1px;
width: 740px;
height: 130px;
text-align: center;
border: 1px solid #000;
margin: 10px;
list-style: none;
font-family: Montserrat, sans-serif;
font-size: 24px;
}
/* Effect 9: second text and borders */
#nav li.parent a {
margin: 0 20px;
padding: 18px 20px;
}
#nav li.parent a::before, #nav li.parent a::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 1px;
background: #fff;
content:'';
opacity: 0.2;
-webkit-transition: opacity 0.3s, height 0.3s;
-moz-transition: opacity 0.3s, height 0.3s;
transition: opacity 0.3s, height 0.3s;
}
#nav li.parent a::after {
top: 100%;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
transition: transform 0.3s, opacity 0.3s;
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
transform: translateY(-10px);
}
#nav li.parent a span:first-child {
z-index: 2;
display: block;
font-weight: 300;
}
#nav li.parent a span:last-child {
z-index: 1;
display: block;
padding: 8px 0 0 0;
color: rgba(0, 0, 0, 0.4);
text-shadow: none;
text-transform: none;
font-style: italic;
font-size: 0.75em;
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
transition: transform 0.3s, opacity 0.3s;
-webkit-transform: translateY(-100%);
-moz-transform: translateY(0px);
transform: translateY(0px);
}
#nav li.parent a:hover::before, #nav li.parent a:focus::before {
height: 6px;
}
#nav li.parent a:hover::before, #nav li.parent a:hover::after, #nav li.parent a:focus::before, #nav li.parent a:focus::after {
opacity: 1;
-webkit-transform: translateY(0px);
}
#nav li.parent a:hover span:last-child, #nav li.parent a:focus span:last-child {
opacity: 1;
-webkit-transform: translateY(0%);
-moz-transform: translateY(0%);
transform: translateY(0%);
}
</style>

inline elements are not cross-browser. in your case consider <span> and <a>. use display: block for those elements or if you don't need those to be block, simply use display: inline-block; vertical-align: top;
that should work for you.

You just remove the <br> tag in between the class "text1" and "text2" in every <a> tag.
HTML:
<span class="text1" style="color:#000;font-size:24px;">Bir Satanistin Anıları</span>
<span class="text2" style="color:#000;font-size:18px;">Hershel Smith</span>

Related

CSS Transition and Transform Not Working in Safari 5.1.7

I am having a problem getting a underline bar to animate under a text link. You can see a working example here: http://tobiasahlin.com/blog/css-trick-animating-link-underlines/
The animation works fine in all browsers except for Safari 5.1.7. What am I doing wrong? Here is my code snippet:
EDIT: Sorry about that, I added the html and more of the CSS rules. I hope that helps.
.infiniteNav{
width: 100%;
height: 56px;
background-color: #9e0707;
background: linear-gradient(#c71e1e, #800909);
background: -webkit-linear-gradient(#c71e1e, #800909);
position: absolute;
top: 271px;
z-index: -2;
}
nav{
width: 955px;
height: 56px;
float: left;
text-align: center;
display: block;
background-color: #9e0707;
background: linear-gradient( #c71e1e, #800909);
background: -webkit-linear-gradient(#c71e1e, #800909);
}
nav a{
position: relative;
font-size: 25px;
font-family: arial;
color: #e0e0e0;
text-decoration: none;
font-weight: bold;
margin: 0px 15px;
line-height: 55px;
}
/********************************************************************************************************
This is the animated underline bar. *
********************************************************************************************************/
nav a:before{
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #e0e0e0;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
/*-webkit-transition: all 0.3s ease-in-out 0s;*/
-webkit-transition-property: all;
-webkit-transition-duration: 0.3s;
-webkit-transition-timing-function: ease-in-out;
-webkit-transition-delay: 0s;
transition: all 0.3s ease-in-out 0s;
}
nav a:hover:before{
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
color: #e0e0e0;
}
nav a:active{
color: #e0e0e0;
}
<nav>
Home
Shop
Sales
Catalog
Events
Contact
About us
Partners
</nav>

trying to make a sidebar with css but cant make it drop line after each button

My problem is that 2 buttons (actually text which is a link) are appearing in one line. I want that only one link will be in a line.
So I'll have 10 lines instead of 8.
By the way, this thing is running on a WordPress theme.
the sidebar
the css code:
.menu {
width: 100%;
height: 55px;
font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.menu li a {
font-size: 11px;
text-transform: uppercase;
font-weight: 600;
letter-spacing: 1px;
color: #0e1015;
opacity: 0.5;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
max-width: 100%;
white-space: normal;
}
.menu li a:hover {
opacity: 1 !important;
}
.menu > li {
margin-right: 32px;
float: left;
position: relative;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
opacity: 1;
}
.menu > li:last-child {
margin-right: 0;
}
.menu > li ul {
left: 0;
width: 200px;
padding: 0;
background: #0e1015;
position: absolute;
z-index: 99;
top: 100%;
opacity: 0;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
transform: translate3d(0, 10px, 0);
-webkit-transform: translate3d(0, 10px, 0);
-moz-transform: translate3d(0, 10px, 0);
visibility: hidden;
margin-top: -1px;
}
.menu > li > ul > li {
position: relative;
line-height: 24px;
width: 100%;
vertical-align: top;
}
.menu > li > ul > .dropdown:after {
color: #0e1015;
top: 1px;
right: 24px;
content: "\f105";
}
.menu > li > ul li a {
color: #fff;
height: auto;
padding: 6px 24px;
}
.menu > li > ul > li > ul {
left: 100%;
top: 0;
}
.menu > li:hover > ul {
opacity: 1;
transform: translate3d(0, 0px, 0);
-webkit-transform: translate3d(0, 0px, 0);
-moz-transform: translate3d(0, 0px, 0);
visibility: visible;
}
.menu > li > ul > li:hover > ul {
opacity: 1;
transform: translate3d(0, 0px, 0);
-webkit-transform: translate3d(0, 0px, 0);
-moz-transform: translate3d(0, 0px, 0);
visibility: visible;
}
Remove the float: left; from your list items.
.menu > li {
margin-right: 32px;
position: relative;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
opacity: 1;
}
Please remove float:left; from li element; they will come automatically one below others

Css menu text not showing beneath icon box

I'm downloading this menu bar (first version) from here: http://www.dynamicdrive.com/style/csslibrary/item/flat_flipping_menu_buttons/ and the problem is: text is not showing in my Blogger page beneath icons. This is the code:
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<style>
ul.flatflipbuttons{
margin:0;
padding:0;
list-style:none;
-webkit-perspective: 10000px; /* larger the value, the less pronounced the 3D effect */
-moz-perspective: 10000px;
perspective: 10000px;
}
ul.flatflipbuttons li{
margin:0;
display: inline-block;
width: 100px; /* dimensions of buttons. */
height: 100px;
margin-right: 15px; /* spacing between buttons */
background: white;
text-transform: uppercase;
text-align: center;
}
ul.flatflipbuttons li a{
display:table;
font: bold 36px Arial; /* font size, pertains to icon fonts specifically */
width: 100%;
height: 100%;
margin-bottom: 4px;
color: black;
background: #3B9DD5;
text-decoration: none;
outline: none;
-webkit-transition:all 300ms ease-out; /* CSS3 transition. Last value is pause before transition play */
-moz-transition:all 300ms ease-out;
transition:all 300ms ease-out;
}
ul.flatflipbuttons li:nth-of-type(1) a{
color: white;
background: #3B9DD5;
}
ul.flatflipbuttons li:nth-of-type(2) a{
background: #A1CD3A;
}
ul.flatflipbuttons li:nth-of-type(3) a{
background: #80C5EC;
}
ul.flatflipbuttons li:nth-of-type(4) a{
color: white;
background: #635746;
}
ul.flatflipbuttons li:nth-of-type(5) a{
background: #F2C96D;
}
ul.flatflipbuttons li a span{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
-webkit-transition: all 300ms ease-out; /* CSS3 transition. */
-moz-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
ul.flatflipbuttons li b{ /* CSS for text beneath button */
display: block;
position: relative;
width: 100%;
opacity: 0;
-webkit-transition: all 300ms ease-out 0.2s; /* CSS3 transition. 0.2s delay */
-moz-transition: all 300ms ease-out 0.2s;
transition: all 300ms ease-out 0.2s;
}
ul.flatflipbuttons li a img{ /* CSS for image if defined inside button */
border-width: 0;
vertical-align: middle;
}
ul.flatflipbuttons li:hover a{
-webkit-transform: rotateY(180deg); /* flip horizontally 180deg*/
-moz-transform: rotateY(180deg);
transform: rotateY(180deg);
background: #c1e4ec; /* bgcolor of button onMouseover*/
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
transition-delay: 0.2s;
}
ul.flatflipbuttons li:hover a span{
color: black; /* color of icon font onMouseover */
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg); /* flip horizontally 180deg*/
transform: rotateY(180deg);
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
transition-delay: 0.2s;
}
ul.flatflipbuttons li:hover b{
opacity: 1;
}
/* CSS for 2nd menu below specifically */
ul.second li a{
background: #eee !important;
}
ul.second li a:hover{
background: #ddd !important;
}
</style>
<ul class="flatflipbuttons">
<li><span class="icon-search"></span> <b>Search</b></li>
<li><span class="icon-gears"></span> <b>Gears</b></li>
<li><span class="icon-rss"></span> <b>RSS</b></li>
<li><span class="icon-twitter"></span> <b>Twitter</b></li>
<li><span class="icon-rocket"></span> <b>Rocket</b></li>
</ul>
You have:
opacity:0
Set on the tag below:
ul.flatflipbuttons li b
You can delete the opacity css selector. http://codepen.io/dfrierson2/pen/RNoWZe
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<style>
ul.flatflipbuttons{
margin:0;
padding:0;
list-style:none;
-webkit-perspective: 10000px; /* larger the value, the less pronounced the 3D effect */
-moz-perspective: 10000px;
perspective: 10000px;
}
ul.flatflipbuttons li{
margin:0;
display: inline-block;
width: 100px; /* dimensions of buttons. */
height: 100px;
margin-right: 15px; /* spacing between buttons */
background: white;
text-transform: uppercase;
text-align: center;
}
ul.flatflipbuttons li a{
display:table;
font: bold 36px Arial; /* font size, pertains to icon fonts specifically */
width: 100%;
height: 100%;
margin-bottom: 4px;
color: black;
background: #3B9DD5;
text-decoration: none;
outline: none;
-webkit-transition:all 300ms ease-out; /* CSS3 transition. Last value is pause before transition play */
-moz-transition:all 300ms ease-out;
transition:all 300ms ease-out;
}
ul.flatflipbuttons li:nth-of-type(1) a{
color: white;
background: #3B9DD5;
}
ul.flatflipbuttons li:nth-of-type(2) a{
background: #A1CD3A;
}
ul.flatflipbuttons li:nth-of-type(3) a{
background: #80C5EC;
}
ul.flatflipbuttons li:nth-of-type(4) a{
color: white;
background: #635746;
}
ul.flatflipbuttons li:nth-of-type(5) a{
background: #F2C96D;
}
ul.flatflipbuttons li a span{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
-webkit-transition: all 300ms ease-out; /* CSS3 transition. */
-moz-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
ul.flatflipbuttons li b{ /* CSS for text beneath button */
display: block;
position: relative;
width: 100%;
-webkit-transition: all 300ms ease-out 0.2s; /* CSS3 transition. 0.2s delay */
-moz-transition: all 300ms ease-out 0.2s;
transition: all 300ms ease-out 0.2s;
}
ul.flatflipbuttons li a img{ /* CSS for image if defined inside button */
border-width: 0;
vertical-align: middle;
}
ul.flatflipbuttons li:hover a{
-webkit-transform: rotateY(180deg); /* flip horizontally 180deg*/
-moz-transform: rotateY(180deg);
transform: rotateY(180deg);
background: #c1e4ec; /* bgcolor of button onMouseover*/
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
transition-delay: 0.2s;
}
ul.flatflipbuttons li:hover a span{
color: black; /* color of icon font onMouseover */
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg); /* flip horizontally 180deg*/
transform: rotateY(180deg);
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
transition-delay: 0.2s;
}
ul.flatflipbuttons li:hover b{
opacity: 1;
}
/* CSS for 2nd menu below specifically */
ul.second li a{
background: #eee !important;
}
ul.second li a:hover{
background: #ddd !important;
}
</style>
<ul class="flatflipbuttons">
<li><span class="icon-search"></span> <b>Search</b></li>
<li><span class="icon-gears"></span> <b>Gears</b></li>
<li><span class="icon-rss"></span> <b>RSS</b></li>
<li><span class="icon-twitter"></span> <b>Twitter</b></li>
<li><span class="icon-rocket"></span> <b>Rocket</b></li>
</ul>

CSS Translate causes typo to break

I'm trying to add an effect to a menu I use on a website.
The effect is the first one of the list with a color change added: http://tympanus.net/Development/CreativeLinkEffects/
But when I try to apply it to my case I have a weird problem that happens on the not hovered element. You can see that the elements that are not hovered change opacity and font-size during the hover on an element.
I added the demo here :
a{
text-decoration:none;
}
/* Effect 15: scale down, reveal */
.cl-effect-15 a {
color: #FFF;
text-shadow: none;
}
.cl-effect-15 a::before {
margin-right: 10px;
content:'[';
-webkit-transform: translateX(20px);
-moz-transform: translateX(20px);
transform: translateX(20px);
}
.cl-effect-15 a::after, .cl-effect-15 a::before {
display: inline-block;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s, opacity 0.2s;
-moz-transition: -moz-transform 0.3s, opacity 0.2s;
transition: transform 0.3s, opacity 0.2s;
font-size: 12px;
}
.cl-effect-15 a::after {
margin-left: 10px;
content:']';
-webkit-transform: translateX(-20px);
-moz-transform: translateX(-20px);
transform: translateX(-20px);
}
.cl-effect-15 a:hover::before, .cl-effect-15 a:hover::after, .cl-effect-15 a:focus::before, .cl-effect-15 a:focus::after {
opacity: 1;
-webkit-transform: translateX(1px);
-moz-transform: translateX(0px);
transform: translateX(1px);
font-size: 14px;
}
.totblockhtml.html_2 {
padding-bottom:10px;
margin-bottom:0px;
}
.totblockhtml.html_2 {
margin-bottom: 0px;
padding-bottom: 9px;
padding-top: 4px;
width: 100%;
float: left;
background: none repeat scroll 0 0 #282F47;
margin-top: -20px;
background-image: url(../img/BlueJean.svg);
}
.totblockhtml.html_2 .block_content {
text-align:center;
color:#ababab;
padding-top: 5px;
}
.totblockhtml.html_2 ul li {
display: inline-block;
margin-left: 70px;
font-size: 14px;
font-family:"trajanpro_regular";
text-transform: uppercase;
letter-spacing: 1px;
position: relative;
}
.totblockhtml.html_2 ul li:first-child {
margin-left:0px;
}
.totblockhtml.html_2 ul li a {
color: #9099AF;
font-size: 11px;
font-family:"Cinzel";
text-transform: uppercase;
letter-spacing: 2px;
-webkit-transition: color 0.5s ease;
-moz-transition: color 0.5s ease;
-ms-transition: color 0.5s ease;
-o-transition: color 0.5s ease;
transition: color 0.5s ease;
}
.totblockhtml.html_2 ul li a:hover {
text-decoration:none;
color: #fff;
}
<div class="block totblockhtml html_2">
<div class="block_content">
<ul class="top_menu ">
<li class="top_menu_search cl-effect-15">Rechercher
</li>
<li class="top_menu_sell cl-effect-15">Vendre
</li>
<li class="top_menu_advice cl-effect-15">Conseils
</li>
</ul>
</div>
</div>
Here's the code changing the opacity:
.cl-effect-15 a::after, .cl-effect-15 a::before {
-webkit-transition: -webkit-transform 0.3s, opacity 0.2s;
-moz-transition: -moz-transform 0.3s, opacity 0.2s;
transition: transform 0.3s, opacity 0.2s;
}
and here's the one changing the font-size:
.cl-effect-15 a:hover::before, .cl-effect-15 a:hover::after, .cl-effect-15 a:focus::before, .cl-effect-15 a:focus::after {
font-size: 14px;
}
I set font-size to 12px and opacity to 1, check it out here: jsFiddle

How to make hover effects on jump link blogger function?

Good day to you:)
Firstly I added a css hover effect on jump-link function on blogger, but it hadn't work
Here is my css :
.jump-link a {
-webkit-transition: color 0.3s;
-moz-transition: color 0.3s;
transition: color 0.3s;
}
.jump-link a::before {
position: absolute;
top: 100%;
left: 50%;
color: transparent;
content: '\2022';
text-shadow: 0 0 transparent;
font-size: 1.2em;
-webkit-transition: text-shadow 0.3s, color 0.3s;
-moz-transition: text-shadow 0.3s, color 0.3s;
transition: text-shadow 0.3s, color 0.3s;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
transform: translateX(-50%);
pointer-events: none;
}
.jump-link a:hover::before,
.jump-link a:focus::before {
color: #fff;
text-shadow: 10px 0 #fff, -10px 0 #fff;
}
.jump-link a:hover,
.jump-link a:focus {
color: #ba7700;
}
I will be thankful for any help . :)
.jump-link a:hover{color:red;text-decoration:underline;}
Also don't use two :: in .jump-link a:hover::before
For example code below will add a "+" when user hovers any link.
a:hover:before {
content: "+";
}

Resources