Why isn't 'on hover' working? [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
For some reason I can't seem to get on-hover to work:
HTML
<div id="custom_nav">
<ul>
<li>•</li>
<li>•</li>
<li>•</li>
<li>•</li>
<li>•</li>
</ul>
</div>
CSS
ul {list-style: none;}
#custom_nav a:link {text-decoration: none; color:red;}
#custom_nav a:visited {text-decoration: none; color:red;}
#custom_nav a:hover {text-decoration: none; color:green;}
#custom_nav a:active {text-decoration: none; color:blue}

The problem is that you have other elements overlapping those bullets, so they don't receive :hover.
If you try removing .site_header and all .project_container elements, it will work.
To fix it, you can add
#custom_nav {
z-index: 1000;
}
in order to make it overlap .site_header, which has z-index:999
Note there is no point in having so large z-index (you have a z-index:2147483647!).
You should read What No One Told You About Z-Index.

Related

A lot of spacing under my <h1> tags? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Hello I am making a dummy promotion page and I am not sure why I have so much
spacing under my h1 tags.
Also for my footer, my li's dont seem to inherit the hover effect?
My li:hover works locally but not when I transfer it over on ftp.
Poking around on your site I found some problems (Chrome inspect is a powerful tool)
In your css/style.css you're setting the hover style on the < li> element, but it's the < a> element you should change the styling of. Change nav li:hover and h1 to this:
nav a:hover {
background: #222; // Looks better
color: #1CDFED;
text-decoration: underline;
}
h1 {
display: inline-block;
margin: 0;
}

Bullet Point is on my Nav menu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I made a site and just did the navbar. On Google its good only the underline is there but on Firefox the bullet points are still there how do I fix this. Also how do I get ride of the underlines?
Try this:
Let say: your nav has container: #nav, then:
#nav a {
list-style-type:none;
text-decoration:none;
}
You should use as CSS reset sheet: CSS Reset
And then for your nav bar:
list-style: none;
text-decoration: none;
You probably need something like text-decoration: none; list-style: none; inside your nav ul tag
Try doing the following:
list-style-type: none;
It would help if we had your code though.
Try the following in your navbar's css:
list-style-type:none;
text-decoration:none;
Here is a reference from MDN. It has everything about list styling.
on css:
*{
text-decoration: none;
list-style: none;
}

On li element hover, apply color to anchor tag in SASS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I have the following CSS I need to convert to SASS:
#menu li:hover > a {
color: #fafafa;
}
How would this be translated?
edit: looking at it, i will try:
menu{
li{
&:hover{
a{
color: #fafafa;
}
}
}
}
Try this:
#menu
li
&:hover
> a
color: #fafafa
Or
#menu{
li{
&:hover{
> a{
color: #fafafa;
}
}
}
}
I have only used .less but tried in http://sassmeister.com/ and SASS result is:
#menu li:hover > a
color: #fafafa

Link stays blue in Firefox [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
My site is at kenastonchiropractic.com
In Chrome, the "Home" link stays the color of the other links and they all turn white upon hover. In Firefox, however, the "Home" link is blue and stays blue even after it is clicked on (but it does turn white on hover). IE appears to behave rightly, as in Chrome.
I have tried many things and had no results. Maybe somebody can see my error.
Thank you!
To avoid such problems, you're always better off setting colors directly on links similar to this:
a{
display:block;
text-decoration:none;
color: #ffffff;
}
And, you should also keep your browser versions updated in case you haven't.
Add this:
#nav ul li:hover a {
color: rgb(255, 255, 255);
}
The default browser pre-set overrided your CSS rule because it is more specific.
The other links aren't affected because you wrapped them with <span style="color:#fff">, which overrides their default colors.
PS: On Chrome it shows a blue color just like all other browsers.
Your "Home" link is the only one that's not wrapped by <span style="color:#fff">.
You need to add the padding to the a tags not the li.
Here is a fiddle.
<ul>
<li>Home</li>
<li>New Patient Process</li>
<li>Health Products</li>
<li>About Us</li>
</ul>
ul li a {
text-decoration:none;
display:block;
padding: 16px 20px;
color:#583709;
transition:.5s all;
}
ul li a:hover {
color:#fff;
background:#000;
}

Hover effect html or css [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm working on my website, and was wondering how to do this hover effect like on this site:
http://www.level1productions.com/athletes.cfm?catID=4
Add :hover to your li class
li.classname {color: #fff}
li.classname:hover {color: #000}
Now when you hover over the element the color of the text will change.
you can easily achieve your desired result with simple html and css
HTML
<div>Shailender Arora
<span>UI Developer</span>
</div>
CSS
div {
background:red;
width:200px;
height:50px;
}
span {
display:block;
color:red;
}
div:hover {
background:yellow;
}
DEMO
Do it with CSS. In CSS there are some thing called pseudo elements and they act as type of functions used for altering the markup tags.
For hover this one is used: :hover
The colon here is very necessasry.
Usage:
tag_name:hover { /*CSS*/ }
Read more about :hover here.