This is a discussion on "Font Color Not Applying! Please Help!!" within the Web Page Design section. This forum, and the thread "Font Color Not Applying! Please Help!! are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Font Color Not Applying! Please Help!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Font Color Not Applying! Please Help!!
I have created a nav bar, and applied the colour white, but only the bullets have gone white, and the actual text for the links is still black:
Thanks |
|
|
|
#2
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
If you have the text buttons linked, then you will have to create css for a:link, a:visited, a:hover, a:active.
Otherwise you won't see the changes. |
|
#3
|
||||
|
||||
|
Re: Font Color Not Applying! Please Help!!
It really helps to have a link (if the page is online) or at least the html code.
Try this: add a "#nav2 ul" style and designate the list items "#nav2 ul li". |
|
#4
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
Lchad is probably right - assuming you're using the LI's as links, you're inheriting the font color from the link style (probably defined in your body selector). A quick, easy way to verify this would be to use
One other note: I find Firebug (runs as a Firefox add-on) indispensible for troubleshooting CSS issues. As you mouse over the code in the Firebug window, it highlights the element on the page and displays the associated CSS - including inherited properties. Makes it a whole lot easier to see what inherited properties are wreaking havoc on your intent! |
|
#5
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
#foo li a {} would be more appropriate or #foo ul li a {}
#foo li a {} #foo li a:visited{} #foo li a:hover {} etc etc
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#6
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
I'm curious as to why you say that? A link using an li is still a child of nav2, right? Why increase the size of the css file if you don't have to?
|
|
#7
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
It's easier to Identify if it's laid out that way. And the increase in file size would be negligible except on extremely large sites.
Pete. |
|
#8
|
||||
|
||||
|
Re: Font Color Not Applying! Please Help!!
I personally use a .nav a {}
Adding ul li in there doesn't do anything, and all the extra selectors can cause conflicts when something isn't defined quite as much. I keep it as simple as possible. |
|
#9
|
|||
|
|||
|
Re: Font Color Not Applying! Please Help!!
I find it easier to identify selectors that way if I'm revisiting a sheet and I've never really had any conflicts yet. It doesn't really matter which way you do it, in my eyes, as long as you are consistent.
Pete. |
|
#10
|
||||
|
||||
|
Re: Font Color Not Applying! Please Help!!
Yep. Sometimes when I have a really large style sheet, I'll run into a situation where changing a few properties has no effect because later or earlier on in my style sheet I have a different selector order that's overriding what I'm trying to change. Highly frustrating sometimes!
|
![]() |
| Tags |
| colour, css, font color |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| background-color | kapyrossi | Web Page Design | 5 | Jul 4th, 2007 15:53 |
| Rollover behaviour applying to whole div-HELP | tobymather | Web Page Design | 7 | Apr 13th, 2007 23:52 |
| Applying style to first para only | Tino | Web Page Design | 6 | Feb 28th, 2007 10:28 |
| Dreamweaver Templates - applying to batch pages | wheatus | Web Page Design | 0 | Apr 15th, 2004 12:18 |