Using CSS Stylesheet in a user control

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Is there a special way to reference a Stylesheet (.css) in a usercontrol?
I have a usercontrol in an aspx page.The aspx page itself has a Header Div,
within which I put my UserControl.ascx. In the UserControl I want to use
DIVS only, just to make work easier at a future point. So, I have an outer
Div called HeaderContainer, and then some contained divs.

If this were just an aspx page, then all the rendering is fine, but when I
try to do so in a usercontrol, I do not get the proper results. If I attach
the stylesheet to the Usercontrol I get the proper rendering on my Visual
Studio 2005 page, but when the user control I place it on a test aspx page,
it does not show up properly. If I also attach the css file to the aspx
file, it shows up in the aspx page, but not in the browser. How can I get
it to show up properly in the browser?

TIA,

Paul
 
Paul,
Simple work around is a panel around your user control and set the panel CSS
attributes.

Good Luck
DWS
 
Back
Top