Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1645 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

CSS Question

Thread title: CSS Question
Closed Thread    
    Thread tools Search this thread Display Modes  
06-06-2008, 02:06 AM
#1
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old  CSS Question

I have a portion of my website in a div called content. I'm trying to change the hyperlink colors in only that section so I tried something like this.

HTML Code:
#content a{
			
			text-decoration: underline;
			color: #273e5b;
		}
		#content a:hover{
			text-decoration: none;
			color: #273e5b;
		}
It's changing the links for the entire site though. Any idea why?

06-06-2008, 02:41 AM
#2
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Can you show the page - that will only change the link colours inside #content, so there must be something in the HTML wrong.

06-06-2008, 02:44 AM
#3
Wildcard is offline Wildcard
Wildcard's Avatar
Status: Member
Join date: Jul 2006
Location: soundwave.
Expertise:
Software:
 
Posts: 379
iTrader: 12 / 100%
 

Wildcard is on a distinguished road

Send a message via MSN to Wildcard

  Old

Mind showing us the xhtml source? If its inside another element inside the 'content' div, then apply the styling to that element instead of the div in general.

And by default the active links have underlines, so your css should look like...
HTML Code:
#content a{
			color: #273e5b;
        }
		#content a:hover{
			text-decoration: none;
			color: #273e5b;
		}

06-06-2008, 02:54 AM
#4
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by Wildcard View Post
And by default the active links have underlines
True, he might have declared text-decoration:none globally on a though, then re-enabled it purely for the links in the content section.

06-08-2008, 05:36 AM
#5
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

Here's the css file. It's pretty messy haha since I got a lot of things to work with cut/paste and trial and error.

#

06-08-2008, 10:00 AM
#6
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by Jako View Post
Here's the css file. It's pretty messy haha since I got a lot of things to work with cut/paste and trial and error.

http://brius.com/includes/base.css
You're not wrong lol.

Anyway, I couldn't find this anywhere:


#content a{

text-decoration: underline;
color: #273e5b;
}
#content a:hover{
text-decoration: none;
color: #273e5b;
}
I searched for it using the find function so it couldn't have missed it. It still there?

06-11-2008, 03:59 AM
#7
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

Ya I pulled it caause i twas jacking up the rest of the site lol.

06-11-2008, 05:08 AM
#8
Garrett is offline Garrett
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 2,694
iTrader: 11 / 100%
 

Garrett is on a distinguished road

Send a message via MSN to Garrett

  Old

Originally Posted by Jako View Post
Ya I pulled it caause i twas jacking up the rest of the site lol.
I don't remember writing half of that stuff

06-16-2008, 04:46 PM
#9
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

You could try the code below.

Code:
a.linkName:link { color:red; text-decoration:none; }
In this case you would have to specify the class linkName in the code. It is an alternative.

06-16-2008, 05:50 PM
#10
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

Originally Posted by Garrett View Post
I don't remember writing half of that stuff
lmao. I combined two style sheets into one which was kind of stupid, but ya. It's a mess but works.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed