user701254
user701254

Reputation: 3943

Change colour of font after loading

Is it possible to change the color of "View Results" text in below ?

   <script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/6352993.js"></script>
    <noscript><a href="http://polldaddy.com/poll/6352993/">This is very long test question to test how polldaddy handles questions that exceed that normal length............ yes a very long question indeed..............</a></noscript>​

I've tried overriding the css 'pds-view-results' which is what "View Results" is styled with but no effect :

.pds-view-results {
    color: red;
}

Here is a fiddle :

http://jsfiddle.net/25LjE/36/

Upvotes: 0

Views: 137

Answers (3)

Jashwant
Jashwant

Reputation: 29005

You can also set your style late

That way you can avoid !important and javascript. But, I'll advice you to put only the last css rule like this, as it may cause flickering. Try it, it may work for you.

<script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/6352993.js"></script>
<noscript><a href="http://polldaddy.com/poll/6352993/">This is very long test question to test how polldaddy handles questions that exceed that normal length............ yes a very long question indeed..............</a></noscript>

<style type='text/css'>
    .pds-pd-link {
display: none !important;
}
.pds-box {
    width: 220px !important;
}
.pds-input-label{
    width: auto! important;
}
.PDS_Poll{
    margin-bottom:15px;
}
.pds-view-results {
    color: red;
}
#PDI_container6352993 .pds-links a{
  color:blue;
}
</style>​

http://jsfiddle.net/nXS4J/

Upvotes: 1

Denys S&#233;guret
Denys S&#233;guret

Reputation: 382170

You can do it from javascript :

$('.pds-view-results').css('color', 'red');

Upvotes: 1

Trogvar
Trogvar

Reputation: 856

Since the link color is already specified by a rule, you should override it via !important keyword

.pds-view-results {
    color: red !important;
}

Upvotes: 5

Related Questions