Powered by:
FutureQuest Hosting


"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

Web Hosting
Shared       
Reseller     
VPS             
Dedicated 
Price:   $(US)
Space:     (MB)
Transfer:(GB)
Platform:


Advertise
Advertising Opportunities
Rate Card

Sponsor
Go Back   Webmaster Forums > Code Forum > CSS Forum


Reply
 
Thread Tools Rate this Webmaster Discussion
  #1  
Old 06-22-2009, 08:39 AM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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 IN CSS THAT DEFINES LINKS:

Code:
a:link {color:#52658C;}
a:visited {color:#52658C;}
a:hover {color:#CC0000;}
a:active {color:#52658C;}
I would like to have the links printed from the code above to show when they have been visited. The PDF's open in a new window, does this mean the code would have to be executed on an onclick?

Stuck, I tried messing with the code:
<hutputText 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


Reply With Quote
  #2  
Old 06-22-2009, 10:14 AM
jthayne's Avatar
jthayne jthayne is offline
Senior Member
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 487
Rep Power: 15
jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz.
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.
Check out the following sites: www.inbutnotoftheworld.com and www.mythoughtexactly.com.
Reply With Quote
  #3  
Old 06-22-2009, 11:05 AM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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.
Reply With Quote
  #4  
Old 06-22-2009, 03:40 PM
jthayne's Avatar
jthayne jthayne is offline
Senior Member
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 487
Rep Power: 15
jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz.
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;}
The visited PDF links should be red while the rest remain as before.

For reference, check here.
__________________
Be sure to click the reputation icon to give rep to the person who helped you.
Check out the following sites: www.inbutnotoftheworld.com and www.mythoughtexactly.com.
Reply With Quote
  #5  
Old 06-22-2009, 03:59 PM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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?
Reply With Quote
  #6  
Old 06-22-2009, 04:10 PM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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.
Reply With Quote
  #7  
Old 06-22-2009, 06:41 PM
jthayne's Avatar
jthayne jthayne is offline
Senior Member
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 487
Rep Power: 15
jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz.
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.
Check out the following sites: www.inbutnotoftheworld.com and www.mythoughtexactly.com.
Reply With Quote
  #8  
Old 06-23-2009, 07:57 AM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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.
Reply With Quote
  #9  
Old 06-23-2009, 08:37 AM
wcipolli wcipolli is offline
Member
 
Join Date: Jun 2009
Webmaster Discussions: 28
Rep Power: 3
wcipolli is on a distinguished road
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
Reply With Quote
  #10  
Old 06-23-2009, 09:53 AM
jthayne's Avatar
jthayne jthayne is offline
Senior Member
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 487
Rep Power: 15
jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz.
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.
Check out the following sites: www.inbutnotoftheworld.com and www.mythoughtexactly.com.

Last edited by jthayne; 06-23-2009 at 10:20 AM. Reason: additional question added
Reply With Quote
Reply
Sponsor

Bookmarks

Tags
css , override , styling

Thread Tools
Rate This Thread
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 07: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


All times are GMT -5. The time now is 05:19 PM.

Copyright © 1999 - 2009 Advanced HTML For Beginners and AHFB2000. All rights reserved.
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.