- This topic is empty.
-
AuthorPosts
-
February 12, 2015 at 7:19 am #195779ares0942Participant
Hey everyone,
I’m actually trying to code 2 DIVS which are next to each other. So far so good.
My Problem is that I want the font to hover, in a different color, when anything of the whole box and also the picture box is hovered.
I cant manage to do that :(
Thank you for your help!!!
Here is what I got so far :)
http://jsfiddle.net/zvpvakaz/5/February 12, 2015 at 7:37 am #195781Paulie_DMemberI’m not entirely sure what it is you are trying to do but a background image there doesn’t seem right and the html structure seems a little overcomplicated.
My Problem is that I want the font to hover, in a different color, when anything of the whole box and also the picture box is hovered.
if I understand correctly, you want the text to change color when anything inside the div
portfoliobox
is hovered…right.Then
.portfoliobox:hover { color:red; /* example color */ }
should work. Let’s see….
http://jsfiddle.net/zvpvakaz/6/
Yep…I’ve disabled some items but as you can see…it works.
If you needed something else…or extra, we can look into that.
February 12, 2015 at 7:52 am #195782ares0942Participantthx for the fast reply and the help :)!
Okay so you would insert a simple image instead of a background image?
The Hover Effect of the Text Works now, but now the div class “boxoben” disappeared…and these two hover effects should work simultaneously.
And the Text Layer should be above the color hover effect.
February 12, 2015 at 8:10 am #195783Paulie_DMemberOkay so you would insert a simple image instead of a background image?
That depends on what the image is and why you are using it.
See this link for an excellent answer on when-to-use-img-vs-css-background-image
div class “boxoben” disappeared
Yes, I disabled that mostly becuase I’m not clear on what it is you are trying to achieve there.
You want the image to get some sort of overlay and the background of the text div to have the same color effect?
February 12, 2015 at 8:12 am #195784ares0942Participantyep exactly. A colored overlay over the image and the same background-color for the text div
February 12, 2015 at 9:45 am #195801Paulie_DMemberOk…rather than using an empty div (which you could still do), I use a couple of pseudo-elements
February 12, 2015 at 1:21 pm #195822ares0942Participantthank you so much! :) works perfectly. Saved my day :)!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.