getaway
getaway

Reputation: 8990

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>';

Upvotes: 0

Views: 278

Answers (7)

Aamir Mahmood
Aamir Mahmood

Reputation: 2724

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.

Upvotes: 1

methodofaction
methodofaction

Reputation: 72385

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;
}

Upvotes: 0

superUntitled
superUntitled

Reputation: 22527

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

Upvotes: 1

Michael Petrov
Michael Petrov

Reputation: 2307

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;
}

Upvotes: 1

ajreal
ajreal

Reputation: 47321

I would use proper css declaration

.a img
{
  border:0px;
}

Upvotes: 1

Shakti Singh
Shakti Singh

Reputation: 86346

instead of # use .

.twitter{
    text-decoration: none;
}

Upvotes: 1

Naveed
Naveed

Reputation: 42093

Use this:

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

Upvotes: 2

Related Questions