Changing H4 font colour in CSS - css

I am trying to change the colour of the font which appears in images in gallery pages such as this page on the site.
I would like to change the text below each image (such a Trail Necklace 111) from #666666 to #007faa.
I used the web inspector to identify that this is an H4 tag in a div class called portfoliotitle_3
It is also a link so altogether I've updated the following parts of the CSS, saved the CSS and refreshed the page a few times but the text colour doesn't change.
#contentwide .portfoliotitle h4 {
color: #007faa;
}
.portfoliotitle a,
.portfoliotitle a:visited {
color: #007faa;
}
#contentwide .portfoliotitle_3 h4 {
color: #007faa;
}
.portfoliotitle_3 a,
.portfoliotitle_3 a:visited {
color: #007faa !important;
}
.portfoliotitle_3 a:hover {
color: #007faa;
text-decoration: none !important;
}
I must be missing something very basic and if anyone can take a fresh look and give me some pointers, that would be very appreciated.
Many thanks

i think Thats because the page load style.css of the page after each reload

It's because of an anchor tag that has some important in color.. so you should probably change the anchor tag to change the color.
.portfoliotitle_3 a, .portfoliotitle_3 a:visited {
color:#007faa !important
}

Cascading is apply for the element a. You can delete this code in internal css style element.
.portfoliotitle_3 a, .portfoliotitle_3 a:visited {
color: rgb(85, 212, 255) !important;
}

Related

How to disable text decoration with CSS?

So, I need to remove a visited link coloring from my navigation bar, as it will look ugly.
I have tried to use text-decoration: none; and color: white; but that does not seem to help it.
CSS for navigation
Actual code
I removed the actual links from the code, in the real version there is link but for this question links are replaced with #
In addition to Bariock's answer, this will help reset your <a> links in all circumstances to your specified css.
a:visited, a:hover, a:active, a:focus {
color: yourColor !important;
text-decoration: none !important;
outline: none !important;
}
The !important signifies that it has a higher precedence than that of other rules declaring the same values for the same selectors. Note: you can still style them separately such like you would with :hover.
a:visited{
color: your-color;
}
I edited the <a> tag to go around the <button> so the text is back to white now and the button actually works. It is no longer just "click text to visit link" the whole button works.
<button class="dropbtn">Community</button>
Try adding a !important to the end of the css styles like so:
a {
color: white !important;
}
Hope this helps!
I recommend you first set the style of the link tag, for example:
.dropdown a{ color:#fff }
now your text links inside the container with the class .dropdown will be as white color. Then you don't need to set a visited link color, unless you want to set it.
If you want to get rid the underline in the link, your style will be like this:
.dropdown a{ color:#fff; text-decoration: none; }

a:active isn't working, is there another code?

Not sure if this is the css I am looking for. I want the active link to have a hover color. By active link I mean my aside link that I am currently visiting.
.widget-area .widget a {
color: #bc7ed1;
}
.widget-area .widget a:hover {
color: #D6A0DB;
}
.widget-area .widget a:visited {
color: #ccc2d3;
}
.widget-area .widget a:visited:hover {
color: #;
}
.widget-area .widget a:active {
color: #;
}
a:active isn't making a color change - is there a different word for the page I am currently visiting or active on? Perhaps something like a:visited:active? Just want the page I am on, that link to be a new color.
I think you misunderstood the pseudo class :active
:active is used for when a user clicks on the link and holds it. And :visited is when a url is already visited. w3schools link on :active
If you need a special style for link of current page add a class like .currentpage to the a-tag with the url via backend or via javascript with style as
.currentpage {color:#ff0000;} /* or any color you prefer */
Hope this helps.

Why aren't my hyperlinks changing colors or underlining?

Why aren't my hyperlinks changing colors or underlining? I have in my CSS in a standard VS 2010 site:
a:link, a:visited
{
color: #034af3;
outline: none;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
outline: none;
}
a:active
{
color: #034af3;
outline: none;
}
p
{
margin-bottom: 10px;
line-height: 1.6em;
}
What am I doing wrong? Am I in the wrong spot? Thanks!
First thing to do is rule out that there are no other style rules being applied later that override yours, or none earlier that are more specific (or use !important) which will not be overridden by your styles.
Also make sure your CSS is in the right place within the HTML.
Make sure there are no other elements, such as a span, within the link that might have styles applied to them which are overriding the a styles.
There are a multitude of other debugging steps to take, but I hope this gets you pointed in the right direction.
You have it set to not display any text-decoration on hover.
With Hover Decoration:
http://jsfiddle.net/KbZNb/
Without Hover Decoration:
http://jsfiddle.net/KbZNb/1/
It looks like it is changing color, but only slightly due to the color similarities of #1d60ff and #034af3
The colors are nearly the same that's why you didn't see the changes. Change the a:hover to #ff0000 and see the outcome
a:hover {color:#ff0000}

Modifying links design for a tumblr theme

I'm trying to modify the way links display in the theme I'm currently working on with the a:link a:hover method in a css file but it don't work and I can't understand why... Any help ? Thank you
You can try this (note a:link doesn't exist in CSS):
a {
text-decoration:none;
color:#000;
font-style:italic;
}
font
a:hover {
text-decoration:underline;
color:#000;
}
a:visited {
color:#000;
}
"a" is the link. text-decoration: none removes the underline, text-decoration: underline adds the underline. font-style:italic adds an italic to the link. the color #000 is black and using that color in a:visited ensures that the link stays black after it's visited (I didn't know if you would want that so I added it anyway).

how do I make HTML links show hover style?

I have some HTML markup in my ASP.NET master page representing a basic navigation menu. THree words that link to three pages. My CSS and HTML are included below for your reference.
When I load the page, the links appear with the correct color (red). If I hover over a link, the link changes to the correct color (blue). So far, we're good. Clicking a link changes the link color to the correct color (yellow). The two remaining links are still red / blue as expected. Clicking a second link changes that link to yellow also. Now I have two yellow links. Neither yellow link displays the hover color (blue) like I'd prefer. Clicking the third link causes it to be yellow, too and none of the links display the hover style.
Although a link has been clicked, I'd like the color to be stored and have the hover color displayed. How do I accomplish this? This is an ASP.NET web application project but I'm only using straight HTML at this point.
/* --- css --- */
a:link
{
color: red;
text-decoration: none;
}
a:hover
{
color: blue;
text-decoration: none;
}
a:active
{
color: green;
text-decoration: none;
}
a:visited
{
color: yellow;
text-decoration: none;
}
/* --- HTML --- */
<p class="MenuItems">
Cars.
Trucks.
Vans.
</p>
As described here, the :hover declaration must come AFTER the :visited and :active declarations.
Basically, in the cascade of your current styles, you won't ever see the :hover color.
Your
a:hover
declaration must come after your
a:visited
declaration in the stylesheet because the visited state is currently taking priority. Always put hover at the end of the a styles declaration block to prevent this.
a:link -> a:visited -> a:active -> a:hover is the optimal ordering.
Just use this:
a:hover
{
color: blue ! important;
text-decoration: none ! important;
}
or as described - use this order:
a:link
{
color: red;
text-decoration: none;
}
a:active
{
color: green;
text-decoration: none;
}
a:visited
{
color: yellow;
text-decoration: none;
}
a:hover
{
color: blue;
text-decoration: none;
}

Resources