Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Overwriting a href style
Old 04-08-2010, 09:24 AM Overwriting a href style
Junior Talker

Posts: 1
Trades: 0
Hi all,

I'm in need of some assistance. For a university project I need to develop a website, but I've hit a roadblock. For the past two hours here's what I've been trying to do.

I've made a collapsible list with JavaScript which utilizes <a href> in HTML to collapse the different lists. Because the page needs to be XHTML valid I have to markup these links by assigning them class="example" parameters instead of using <h2></h2> tags.

The list is enclosed in a content div, which styles a lot of my other pages of the website, as well as my normal links like navigation.

In my CSS I have:
Code:
#content a:link {
	font-size: 13px;
	color: #6D929E;
	font-weight: bold;
	text-decoration: none;
	}

#content a:visited {
	font-size: 13px;
	color: #9FAEB3;
	font-weight: bold;
	text-decoration: none;
	}

#content a:hover {
	font-size: 13px;
	color: #9FAEB3;
	font-weight: bold;
	text-decoration: none;
	}

#content a:active {
	font-size: 13px;
	color: #6D929E;
	font-weight: bold;
	text-decoration: none;
	}
For the last two hours I've tried to add code ranging from
Code:
a.example
{
	
	font-size: 31px;
	color: #6D929E;
}
to

Code:
.example
{
	
	font-size: 31px;
	color: #6D929E;
}
to

Code:
#content a.example:link
{
	
	font-size: 31px;
	color: #6D929E;
}
#content a.example:visited
{
	
	font-size: 31px;
	color: #6D929E;
}
#content a.example:active
{
	
	font-size: 31px;
	color: #6D929E;
}
#content a.example:hover
{
	
	font-size: 31px;
	color: #6D929E;
}
And many more in between. I've read loads of websites that didn't lead me to anywhere. Now I'm turning to you, the great internet to help me out...

I have uploaded the relevant files here, http://drop.io/o5anxa0

If anyone could help me out, I'd be forever grateful!
hootch is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-08-2010, 11:49 PM Re: Overwriting a href style
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
A link to the functioning site would be helpful.

Your section specific CSS should be something like...

div#content a, div#content a:hover {
}

or

.example a, .example a:hover {
}
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 04-09-2010, 04:59 PM Re: Overwriting a href style
GeekSpecialties's Avatar
Super Talker

Posts: 132
Name: Leonard
Location: Minnesota, USA
Trades: 0
You just need to be more specific in your CSS.

Code:
div#content ul.treemenu li a:link, 
div#content ul.treemenu li a:visited
{
    
    font-size: 13px;
    color: #d16d10;
}
This is one of my favorite examples.
http://www.stuffandnonsense.co.uk/ar...city_wars.html
__________________
Len,

Please login or register to view this content. Registration is FREE
.
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

GeekSpecialties is offline
Reply With Quote
View Public Profile Visit GeekSpecialties's homepage!
 
Reply     « Reply to Overwriting a href style
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.66343 seconds with 12 queries