Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Item Color on Style 1

Status
Not open for further replies.

d2007

Programmer
May 17, 2007
18
0
0
US
I am having difficulty with the following:

.headerNavPanel li a:hover
{
color: #11619f;
}

The color does not seem to work, it only seems to work when I reference using the control id:
#blHeaderNav li a:hover { color: #11619f; }

However, I do not want to change the a color on the list items by referencing the control, I would like to use the headerNavPanel style I have created.

What am I doing wrong?

Thanks in advance
 
sorry --

I am using ASP.NET server controls as follows:

<asp:panel ID="pnlHeader" runat="server" CssClass="headerNavPanel">
<asp:BulletedList ID="blHeaderNav" runat="server" DisplayMode="HyperLink">
</asp:BulletedList>
</asp:panel>
 
Hi

Feherke said:
For example not posted the relevant HTML code...
The underline words are not there accidentally. We have nothing to do with server-side code when debugging client-side problems, like HTML and/or CSS. Copy & paste the HTML code as displayed by your browser's View source command.

Feherke.
 
okay, here is the source

Code:
            <div id="ctl00_pnlHeader" class="headerNavPanel">
	        
                <ul id="ctl00_blHeaderNav">
		<li><a href="Default.aspx">PRODUCTS & SERVICES</a></li><li><a href="Default.aspx">ABOUT US</a></li><li><a href="Default.aspx">CONTACT</a></li><li><a href="Default.aspx">LOGIN</a></li>
	</ul>
            
</div>
 
Hi

Reverencing the elements as .headerNavPanel li a:hover works for me.

If not works for you, that could mean that
[ul]
[li]you have syntax error in your CSS ( use W3C CSS Validation Service )[/li]
[li]another style with higher specificity is applied ( see Calculating a selector's specificity )[/li]
[/ul]
Probably would be faster to post an URL to a publicly accessible copy of your page.


Feherke.
 
thanks very much, I found another style that appeared to override -- looks to be working now.

thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top