/    Sign up×
Community /Pin to ProfileBookmark

href hovers after used on time…

hello all, i have this css settings for all my site hrefs:

[code=php]
a{text-decoration:none;color:#447bac;}
a:link{text-decoration:none;color:#447bac;}
a:visited{color:#447bac;}
a:hover{text-decoration:underline;color:#cc0957;}
a:active{color:#fc0000;}
[/code]

i dont know why but my hrefs hovers only if i have used the one time….
can anyone help???

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@KorNov 25.2010 — let a:hover{} to be [I]the last line[/I]. And I guess you don't need the a:link{}
Copy linkTweet thisAlerts:
@dpsimauthorNov 25.2010 — nothing changed....i put it in the end....
[code=php]
a{text-decoration:none;color:#447bac;}
a:visited{color:#447bac;}
a:active{color:#fc0000;}
a:hover{text-decoration:underline;color:#cc0957;}
[/code]


but the css file i very large and i have 10 css files loaded in my template....

needs to be the last line like above...or in the last line of all css.....
Copy linkTweet thisAlerts:
@KorNov 25.2010 — It is a simple piece of CSS and, normally, it works OK, as it should. You have probably other CSS codes which overwrites the properties. Use Firefox as browser and install FireBug console (or IE8 and open the Developer Tool) to see the CSS behavior of your elements
Copy linkTweet thisAlerts:
@dpsimauthorNov 25.2010 — yes, but if i clicked one time...then it works the hover every time...????
Copy linkTweet thisAlerts:
@dpsimauthorNov 25.2010 — check this...is my default css config....
[code=php]
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline;}
address,caption,cite,code,dfn,strong,th,var{font-style:normal;font-weight:normal;}

ol,ul{list-style:none}

h1, h2, h3, h4, h5, h6{
font-family:"Trebuchet MS",Arial,Helvetica,san-serif;
font-weight:normal;
letter-spacing:0.4px;
line-height:1.4em;
position:relative;
}

h1{font-size:24px;}
h2{font-size:22px;}
h3{font-size:16px;}
h4{font-size:12px;}
h5{font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;float:left; margin:5px 0 0 14px;font-size:14px; font-weight:bold; color:#555;}
h6{font-size:10px;}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a{
text-decoration:none;
border:none;
color:#E1E1E1;
}
h1 a:link{
text-decoration:none;
border:none;
color:#447bac;
}
a{text-decoration:none;color:#447bac;}
a:visited{color:#447bac;}
a:active{color:#fc0000;}
a:hover{text-decoration:underline;color:#cc0957;}

#top h1 a:hover, #top h2 a:hover, #top h3 a:hover, #top h4 a:hover, #top h5 a:hover, #top h6 a:hover{
text-decoration:none;
border:none;
}
body{
font-family: "trebuchet ms", sans-serif;
font-size: 12px;
color:#999;
}
[/code]
Copy linkTweet thisAlerts:
@KorNov 25.2010 — OK, so? What to do with your code? I see that you have given different CSS properties to your link, according to their parents (h2, #top h1, ...). And? You'd rather post a link to a test site and tell us precisely which link does not work as expected on hover.
×

Success!

Help @dpsim spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...