How can I make the following menu using CSS? - css

I have this menu:
How can I make active white background behind text (ul,li)?
How can I make the background white text on mouse-over? (Contact,Recommended Downloads)
This is image for background:

menuButton:hover
{
background:white;
}
This, hover, should change the color of background when hovering over the div

Related

How to make it by css hover?

Take a look at the image. First one is hover. How to make such gradient hover effects with the gradient background?
Here's the HTML code- https://github.com/itsumrat/olivia/blob/master/index.html#L127
Here's SCSS code-
https://github.com/itsumrat/olivia/blob/master/assets/src/scss/components/_feature.scss
This is a simple Background Change on Hover:
#yourbutton:hover {
background: linear-gradient: ....;
}
Maybe there's a div in the button with a small white border around. You could Effect the color of that div to have the same result as in the image.

Ways to make image hover

I have this image and I want to make it white by default and cyan by hover. Is there another way than to make 2 images, one white and one cyan?
You can make a PNG where the magnifying glass is transparent, then set the background color on the img tag in CSS:
img {
background: steelblue;
}
img:hover {
background: skyblue;
}
Demo: http://jsbin.com/jeqihuxo/2/edit
Another way is to use sprites. Well, technically would not be two seperate images but one image which background-position is changed on hover. Your image is 36x48, so make a new image 72x48 with the non-hover version on the left side and the hover version on the right and move the background on hover.

can a div's text be made invisible but its background image remains visible

I would like to make the text content of my div invisible but still display the background image. Is that possible?
In the app, the div's single-character content determines which class is conditionally applied to the div, but the content itself is not what needs to be displayed. I want to display the image associated with the class.
Add color:transparent; to the div CSS. It would make the div have text but text color is transparent with respect to the background.
CSS (with sample image):
#test{
background-image: url('http://static.adzerk.net/Advertisers/12f0cc69cd9742faa9c8ee0f7b0d210e.jpg');
height: 300px;
color: transparent;
}
Demo Fiddle.

Match overflowing box height to its parent box

I have box with nested image and div with text information. I'm doing simple CSS trick with positioning and display parameter changes on hover, so text box is only seen if hover on main box.
Here's my problem, text box has background with opacity, how can I match height of the box with background to its parent when it's show on hover.
Here's live example: http://jsfiddle.net/Mamaduka/jDYu5/16/
If I understand correctly, all you need to do is give texts a height of 100%
.box:hover .texts {
display: block;
height:100%;
}
Worked for me when I edited your fiddle.

Change image and background colour when hover on either element

I have a div that has a background colour and it also contains an <a> with a background image. Currently i've got it to change the background colour of the div and the image when i hover over the image. However when i hover over the visible part of the background colour (most of it is covered by the image) only the background colour changes and not the image.
Here is the code i have.
HTML
<div id="kitchenCol">
<p></p>
</div><!-- End div kitchenCol -->
CSS
#kitchenCol a.rollover
{
display:block;
width:279px;
height:576px;
background:url(../images/kitchenCol.jpg);
}
#kitchenCol a.rollover:hover{background-position:-279px 0;}
#kitchenCol{background:#cccccc;}
#kitchenCol:hover{background:#936768;}
How can i make it so both the image and the background colour changes when i hover over either the image or the background colour.
I am not entirely sure I understand, but try this:
#kitchenCol:hover a.rollover{background-position:-279px 0;}
Instead of #kitchenCol a.rollover:hover{background-position:-279px 0;}.
Mind that won't work on IE6, and possibly IE7 either.

Resources