开发者

changing a div's hyper link style?

#twitter{
    text-decoration: none;
}
.a:link,a:hover{
    text-decoration: none;

}

im trying to remove text decoration from this picture link. but its not working.

echo '<a class="twitter" href="' . $twitterObj->getAuthorizationUrl() . '"><img src="img开发者_运维知识库/darker.png"></a>';


Use this:

<img src="img/darker.png" border="0">


instead of # use .

.twitter{
    text-decoration: none;
}


I would use proper css declaration

.a img
{
  border:0px;
}


Add this extra rule:

a:link img,a:hover img{
    border: 0px;
}

That will apply the no border rule to any img tags under your links. I also think this rule should work just as well:

a img{
    border: 0px;
}


You have a period before your a:link (you have it written like this: .a:link).


Better use some "CSS Reset" it will generalize most of the margin padding issues to common browsers.

Also in your main css put something like this

img {border: 0}

Then you don't have to put border 0 in all image tags.


Your css is looking for an id (#) and in the HTML code you have a class (.). In the second declaration you have a preceding dot that shouldn't be there. So wrapping everything up...

a.twitter{
    text-decoration: none;
}

a.twitter img {
  border: none;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜