Help building user controls & CSS

D

Dennis

I am building a simple ASP page and wanted to add user controls for a
header and a naviagation menu but I have run into problems. So I made
the header & menu without problems but I'm stuck on the Hyperlinks to
the other pages for the menus. When a hyperlink is not selected it
should be using 'Unselected' in the style sheet and then 'Selected'
when it's selected. On the menu, Menu.ascx, I used a table with 5
rows and used WebForm Hyperlinks and then I created a .CSS sheet with
the following items in it.

..Unselected
{
font-weight: bold;
font-size: 10pt;
color: blue;
font-family: 'Book Antiqua';
text-decoration: none;
}
..Selected
{
font-weight: bold;
font-family: 'Book Antiqua';
text-decoration: none;
font-size: 12pt;
color: red;
}

Then what I did was set each hyperlink's CssClass to unselected but no
matter what I can't get the selected hyperlink to use the selected
settings on the page. Before, I used a menu on each page and simply
set the active links style property to selected and all of the others
to unselected. I wanted to use a common menu for all pages but I
simply can't figure this out. I have searched a lot of pages for this
information but I can't find anything that can help in over 12 hours
of searching. So everything works great now except this little thing,
any ideas of where to look for information or what I should do? I
would pull hair out but I don't have any left.

Thanks for any help, Dennis

This is the Menu.ascx code, sorry the formatting got killed

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="Menu.ascx.vb" Inherits="Prac1.Menu"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"
%>

<link rel="stylesheet" type="text/css" href="Menu.css" >

<P>
<TABLE id=Table1 align=center style="WIDTH: 207px; HEIGHT:
209px"
cellSpacing=1 cellPadding=1 border=0>
<TR>
<TD style="HEIGHT: 2px">
<asp:HyperLink id=HyperLink1
runat="server" NavigateUrl="Page1.aspx"
Font-Bold="True"
Font-Names="Arial" Font-Size="Small" CssClass="Unselected">
Cat-1</asp:HyperLink>
</TD>
</TR>
<TR>
<TD style="HEIGHT: 2px">
<asp:HyperLink id=HyperLink2
runat="server" NavigateUrl="Page2.aspx"
Font-Bold="True"
Font-Names="Arial" Font-Size="Small" CssClass="Unselected">
Cat-2</asp:HyperLink>
</TD>
</TR>
<TR>
<TD style="HEIGHT: 2px">
<asp:HyperLink id=HyperLink3
runat="server" NavigateUrl="Page3.aspx"
Font-Bold="True"
Font-Names="Arial" Font-Size="Small" CssClass="Unselected">
Cat-3</asp:HyperLink>
</TD>
</TR>
<TR>
<TD style="HEIGHT: 2px">
<asp:HyperLink id=HyperLink4
runat="server" NavigateUrl="Page4.aspx"
Font-Bold="True" Font-Names="Arial"
Font-Size="Small" CssClass="Unselected">
Cat-4</asp:HyperLink>
</TD>
</TR>
<TR>
<TD style="HEIGHT: 2px">
<asp:HyperLink id=HyperLink5
runat="server" NavigateUrl="Page5.aspx"
Font-Bold="True" Font-Names="Arial"
Font-Size="Small" CssClass="Unselected">
Cat5</asp:HyperLink>
</TD>
</TR>
</TABLE>
</P>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top