![]() |
| HTML | PHP Scripts | Webmaster Tools | Webmaster Forums | Web Hosting | Domain Names | Webmaster Books |
|
|
#1 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
How to override CSS styling in one part of webpage
CODE IN JSP THAT DYNAMICALLY PRINTS SEARCH RESULTS THAT I WOULD LIKE TO HAVE A DIFFERENT FORMAT:
Code:
<hx:outputLinkEx styleClass="outputLinkEx" id="formPdfLink"
onclick="return openPDFWord(this, '#{varsearchResults.targetURLForPDF}');"
value="#{varsearchResults.pdfURL}">
<h:outputText styleClass="outputText" id="text7"
value="#{varsearchResults.formIdAndEditionDate}"
escape="false"></h:outputText>
</hx:outputLinkEx>
Code:
a:link {color:#52658C;}
a:visited {color:#52658C;}
a:hover {color:#CC0000;}
a:active {color:#52658C;}
Stuck, I tried messing with the code: <h utputText style="color:red;"this makes just those links red. I tried vlink=#CC0000 which didn't work ![]() Any help would be greatly appreciated.. I tried 3 forums to no avail ![]() Regards, Will |
|
|
|
|
|
#2 |
|
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21 ![]() ![]() ![]() ![]() |
Re: How to override CSS styling in one part of webpage
If you are wanting the link to be a different color when it has been visited, all you need to do is change the a:visited in your CSS to be a different color than a:link.
__________________
Be sure to click the reputation icon to give rep to the person who helped you. For web design/development services, check Silentium Designs. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
Re: How to override CSS styling in one part of webpage
I want just those links printed by that block of code to show visited. The vlink is set to the same color because i dont want any of the other links to show that they are visited.
|
|
|
|
|
|
#4 |
|
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21 ![]() ![]() ![]() ![]() |
Re: How to override CSS styling in one part of webpage
Sorry about that. I didn't catch that you wanted the links to be different across the page. The same principle applies though. As long as the code was set up correctly, you will style the outputLinkEx class.
For example, make the following changes to your CSS file: Code:
a:link {color:#52658C;}
a:visited {color:#52658C;}
a:hover {color:#CC0000;}
a:active {color:#52658C;}
a.outputLinkEx:link {color:#52658C;}
a.outputLinkEx:visited {color:#FF0000;}
a.outputLinkEx:hover {color:#CC0000;}
a.outputLinkEx:active {color:#52658C;}
For reference, check here.
__________________
Be sure to click the reputation icon to give rep to the person who helped you. For web design/development services, check Silentium Designs. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
Re: How to override CSS styling in one part of webpage
No dice. Still not showing visited links. I was thinking about trying to span.. but that was unsuccessful too. I'm assuming because outputText uses span, I don't think you can span a span?
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
Re: How to override CSS styling in one part of webpage
from my understanding of the code. outputLinkEx allows the js to get the search result values and outputText prints the actual link...
when I threw in style="color:red;" next to outputText all the links turned red i tried style = "vlink:red" but wasn't lucky enough for that to work. |
|
|
|
|
|
#7 |
|
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21 ![]() ![]() ![]() ![]() |
Re: How to override CSS styling in one part of webpage
In the code I gave you, try changing outputLinkEx to outputText.
__________________
Be sure to click the reputation icon to give rep to the person who helped you. For web design/development services, check Silentium Designs. |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
Re: How to override CSS styling in one part of webpage
Still not working. I feel like it has a lot to do with the PDFs opening in a new window.
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 8 ![]() |
Re: How to override CSS styling in one part of webpage
i also tried:
.outputText a:link... and #outputText a:link... and .outputLinkEx a:link... and #outputText a:link... none of which worked |
|
|
|
|
|
#10 |
|
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21 ![]() ![]() ![]() ![]() |
Re: How to override CSS styling in one part of webpage
If you remove all CSS formatting of the a element, does the link show as a different color after you click on it?
Also, what browser are you viewing it in?
__________________
Be sure to click the reputation icon to give rep to the person who helped you. For web design/development services, check Silentium Designs. Last edited by jthayne; 06-23-2009 at 09:20 AM. Reason: additional question added |
|
|
|
![]() |
| Bookmarks |
| Tags |
| css, override, styling |
| Thread Tools | |
| Rate This Thread | |
|
|
Similar Webmaster Discussions
|
||||
| Thread | Webmaster Discussion Starter | Forum | Replies | Last Post |
| Scroll bar for part of page | cokesodanotd | HTML Forum | 1 | 04-12-2004 06:45 AM |
| Insert a Webpage within a Webpage without Frames ?? | Samoyed | PHP Forum | 1 | 12-16-2003 04:52 PM |
| Table Woes part 2 | Gimik | HTML Forum | 9 | 03-04-2002 08:36 PM |