css transition stopped working - html

After changing styles to some inner divs hover transition stopped working. To see if that was the cause, i removed new styling, but the problem stayed. Can't understand why.
Live link is here
.com/
It's these blocks on the left of the slider
html code (though it's the same with the one that was working just fine before)
<div class="slidersidehover slidersideheight" id="sliderside1">
<div id="sliderside1title"></div>
<div id="sliderside1content"></div>
</div>
<a href="" target="_blank">
<div class="slidersidehover slidersideheight" id="sliderside2">
<p id="sliderside2txt"></p>
<div id="sliderside2bg"></div>
</div></a>
<a href="" target="_blank">
<div class="slidersidehover slidersideheight" id="sliderside3">
<p id="sliderside3txt"></p>
<div id="sliderside3bg"></div>
</div></a>
and css
.slidersidehover {
background-color:black !important;
transition:0.3s;
-ms-transition:0.3s;
-o-transition:0.3s;
-moz-transition:0.3s;
-webkit-transition:0.3s;
}
.slidersidehover:hover {
opacity:0.5;
}

try to remove html comment <!--slider--> in your style.css
and use css comment: /* slider */

As far as I understand transitions only happen if you declare the property on both the active state and rest state.
.slidersidehover {
opacity:1;
background-color:black !important;
transition:0.3s;
-ms-transition:0.3s;
-o-transition:0.3s;
-moz-transition:0.3s;
-webkit-transition:0.3s;
}
.slidersidehover:hover {
opacity:0.5;
transition:0.3s;
-ms-transition:0.3s;
-o-transition:0.3s;
-moz-transition:0.3s;
-webkit-transition:0.3s;
}
I am not sure exactly what effect you are going for but for explanation purposes I set the opacity to 1 on the rest state and then opacity to 0.5 on your hover. That should fix the issue.

Related

Positioning over image and under image

Good day. I have a code:
<div style=\"position:relative;height:auto;padding:5px;float:left;\">
<img id=\"avimg\" src=".$uinfo["avatar_url"]."><p id=\"act-await\" style='position:absolute;top:13px;left:24px;'><i id=".$uinfo['id']." class=\"icon-checkmark\" onclick=\"accfr(this.id);\"></i><br><i id=".$uinfo['id']." onclick=\"decfr(this.id);\" class=\"icon-cancel-2\"></i></p>
</div>
CSS:
#avimg:hover {
opacity:0.3;
-moz-opacity:0.3;
filter:alpha(opacity=40);
}
#act-await {
display:none;
}
#avimg:hover + #act-await {
display:block;
}
All works. But I need a link under an image. When I make this, block #act-await not showing (when mouse over).
<div style=\"position:relative;height:auto;padding:5px;float:left;\">
<img id=\"avimg\" src=".$uinfo["avatar_url"]."><br><font size=\"1\">".$uinfo['name']. "<br>".$uinfo['surname']."</font>
<p id=\"act-await\" style='position:absolute;top:2px;text-align:center;'><i id=".$uinfo['id']." class=\"icon-checkmark\" onclick=\"accfr(this.id);\"></i><br><i id=".$uinfo['id']." onclick=\"decfr(this.id);\" class=\"icon-cancel-2\"></i></p>
</div>
If you don't know what the link is yet use the pound key. You have an empty href
<a href ="#"......
In you case
<a href=\"#\".......
And when you have a link replace the pound key with it

Hyperlink not responding

My landing page has a slideshow with text and links that direct the visitor to it's corresponding page.
Landing page link: http://karenrubkiewicz.com/martin/
The yellow arrow in the second box should be a clickable link, but it doesn't respond.
Here is my coding:
HTML
<div id="maximage">
<div>
<img src="images/00_landing page/backgrounds/background_01.jpg" alt="" width="1400" height="1050" />
<div class="in-slide-content">
PLACES
</div>
<a class="in-slide-content2" href="places.html"><img src="images/arrow.png" height="20px"></a>
</div>
<div>
<img src="images/00_landing page/backgrounds/background_02.jpg" alt="" width="1400" height="1050" />
<div class="in-slide-content">
PLACES
</div>
<a class="in-slide-content2" href="places.html"><img src="images/arrow.png" height="20px"></a>
</div>
ETC...
</div> <!--END MAXIMAGE DIV-->
CSS
#maximage {
/* position:fixed !important;*/
display:block;
}
.in-slide-content {
font-family: 'Oswald', sans-serif;
font-size:16pt;
letter-spacing:1px;
position: absolute;
right:63px;
bottom:240px;
width: 220px;
background: rgba(0,0,0,0.8);
color:#FFF;
text-align:center;
text-decoration:none;
padding-top:23px;
padding-bottom:23px;
-webkit-font-smoothing:antialiased;
}
.in-slide-content2{
position: absolute;
right:63px;
bottom:162px;
width: 220px;
background: rgba(0,0,0,0.8);
text-align:center;
padding-top:25px;
padding-bottom:25px;
-webkit-font-smoothing:antialiased;
}
.in-slide-content2 a{
position: relative;
display:block;
}
I am using a maximage plugin, I am not sure whether that could be a possible cause of inference.
One more note, in my HTML, when I remove a certain div, the link begins to work, only then my slideshow falls apart.
EXAMPLE
<div id="maximage">
<div> <----REMOVE THIS DIV
<img src="images/00_landing page/backgrounds/background_01.jpg" alt="" width="1400" height="1050" />
<div class="in-slide-content">
PLACES
</div>
<a class="in-slide-content2" href="places.html"><img src="images/arrow.png" height="20px"></a>
</div> <-----AND REMOVE THIS DIV
ETC...
</div> <!--END MAXIMAGE DIV-->
I'm really stuck on this one.
Thanks in advance!
Place this in CSS:
#nav {
z-index: 2;
}
body .mc-cycle {
z-index: 0;
}
If it wont help, then this:
#nav {
z-index: 2 !important;
}
body .mc-cycle {
z-index: 0 !important;
}
Looking at your codes on your site, (which btw look different from what you posted here), I think things get complicated when your in-slide-content and in-slide-content2 divs are enclosed in your mc-image with its background set to your image file (instead of using an img tag).
This is what your current codes look like:
<div class="mc-image " ... background-image: url(http://karenrubkiewicz.com/martin/images/00_landing%20page/backgrounds/background_01.jpg);" data-href="">
<div class="in-slide-content">PLACES</div>
<a class="in-slide-content2" href="places.html"><img src="images/arrow.png" height="20px"></a>
</div>
Try convert your mc-image to an image tag and extract your in-slide-content and in-slide-content2 out of your maximage.
I think this live demo on jsfiddle is very similar to what you are trying to do.
The reason why manipulating the z-index attribute (of the image, the anchor tag etc.) in your css script probably won't work is because the jquery.cycle.all.js script assigns all your images with some high value z-index on start-up so that they can stack on top of each other.
// line 295 - 303
// set position and zIndex on all the slides
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
var z;
if (opts.backwards)
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
else
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
$(this).css('z-index', z)
});
As the script cycles through your images, some codes (I haven't figured out where yet) will reset the z-index of that image to z+1, so that current image will be stack on top of the rest. I tried setting the z-index of some of your HTML elements to some ridiculous high number but to no avail. Anyway, I still think the cleanest way to solve this is to look at the fiddle I shared.

Hover for Container and change bgcolor of Nested Div?

First of all thank you for your time reading my question!
I m trying to do a hover code to affect an element (nested div's background color) and I found some answers and tried them but couldn't get it to work. Is there a solution to get this to work without using JS/jQ? this is part of a wordpress loop, so using jquery to select elements may not be the best idea. Any thoughts? Thanks!
What I am trying to get is that when the user hovers over any part of div#press, only the div#text should change it's background color to #FFF (div#press remains the same)
<a href="press.php">
<div id="press" class="middle_bar">
<div id="text">
<h2><?php the_title(); ?></h2>
Published <?php the_time('j F Y') ?>
</div>
</div>
</a>
Thanks so much!
EDIT: It seems like setting a preset background color at #text breaks the code? Any reason why this happens? have attached the new code with inline styles
<a href="press.php">
<div id="press" class="middle_bar" style="padding: 200px">
<div id="text" style="float:left; width: 380px; margin-left: -25px; padding: 20px; background:#999999;">
<h2>1251515151</h2>
Published 11111
</div>
</div>
#press{
background:red;
height:50;
text-align:center;
}
#text{
height:50px;
width:50px;
background:dodgerblue;
}
#press:hover > #text{
background:#fff;
}
JSFiddle
If this isn't working for you, probably somewhere else you've a css selector having more specificity than the hover selector, may be inline styles... (injected by some script..?) )also watch out for !important
You'll need to use the :hover pseudo class on the <div id="press"></div>. In addition, you'll need to use the > descendant selector to target the <div id="text"></div> child.
You should be able to do something like the following:
#press:hover > #text {
background-color: #fff;
}
Demo: JSFiddle

Linked image in HTML (both wrapped and internal link) won't 'link'

I'm working on a site that has a "switch" (just an images linked to a different version of the site). The image will show up, but it wont be clickable. After some troubleshooting, I also discovered it was clickable before I put any CSS or internal styling in. The image is using both a wrapped link and an internal link.
Code:
<a href="aboutOff.htm">
<div style="position:absolute;left:90%;float:right;">
<img src="on.jpg" href="aboutOff.htm" alt="Switch" id="switch" style="z-index:12; float:right;"/>
</div>
</a>
CSS:
#switch{
width:119px;
height:auto;
z-index:10;
}
Any help would be GREATLY appreciated. Thanks!
HTML
<div class="switchContainer">
<a href="aboutOff.htm">
<img class="switch" src="on.jpg" href="aboutOff.htm" alt="Switch"/>
</a>
</div>
And the CSS
.switchContainer {
position:absolute;
left:90%;
}
.switch {
width:119px;
height:auto;
z-index:10;
}

IE 6, 7 hover works for all corners except right-bottom

I want different menu items in different corners having a simple hover effect. Following code is working. But only right-bottom menu item is not giving proper effect in IE6 and IE7. Whats wrong?
Here is the fiddle.
CSS:
.d
{
height:50px;
width:50px;
background-color:#b2b2b2;
position:fixed !important;
*position: absolute;
}
.da {position:absolute;}
#d1 {left:0; top:0;}
#d2 {right:0; top:0;}
#d3 {right:0; bottom:0;}
#d4 {left:0; bottom:0;}
#d1a {bottom:0; right:0;}
#d2a {bottom:0; left:0;}
#d3a {top:0; left:0;}
#d4a {top:0; right:0;}
#d1a:hover {right:-5px; bottom:-5px;}
#d2a:hover {bottom:-5px; left:-5px;}
#d3a:hover {top:-5px; left:-5px;}
#d4a:hover {top:-5px; right:-5px;}
HTML:
<div class="d" id="d1">
<a class="da" href="#" id="d1a"><img src="images/contact.png" /></a>
</div>
<div class="d" id="d2">
<a class="da" href="#" id="d2a"><img src="images/contact.png" /></a>
</div>
<div class="d" id="d3">
<a class="da" href="#" id="d3a"><img src="images/contact.png" /></a>
</div>
<div class="d" id="d4">
<a class="da" href="#" id="d4a"><img src="images/contact.png" /></a>
</div>
IE6 and IE7 are having a hard time with the negative numbers for some reason on the BR.
Strangely enough, if you remove the #d3a {top:0; left:0} css rule, (That should be its default position anyway) the problem goes away. In fact, if you play with it...any value other than top:0, left:0 allows the browser to properly determine the hover position of the #d3a div.
Further experimentation with !important on the #d3a:hover rule will help support that this is not an issue with css applying correctly, but rather, with the browser's ability to render position correctly. (That is to say that the css style is applying...but having no effect.)
I have found following solutions for the problem:
1) to add visibility:hidden to #d3a:hover block
or
2) to add margin-left:0% to #d3a:hover block
both solutions will make the code running properly in IE6 and IE7. (Even it is working with IE5.5 too)