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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use CSS in custom controls

Status
Not open for further replies.

Cenedra

Programmer
Joined
Jan 2, 2003
Messages
114
Location
US
Hi,

I'm making a customer control navigation bar. How do I link up to my CSS file for this control? This is my code:

<%@ Control
Language="vb"
AutoEventWireup="false"
Codebehind="Title.ascx.vb"
Inherits="CHMA.Title"
TargetSchema="%>
<HEAD>
<link href="styles/title.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<img src="images/top.jpg">
<div id="navbar2">
<ul>
<li id="li1">
something
<li id="li2">
something
<li id="li3">
something
<li id="li4">
something
<li id="li5" >
something</li>
</ul>
</div>
</body>

However it's not picking up the style.

Is there a different way for me to reference a CSS sheet within a custom control?

Thanks for your help!
Cen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top