Stylesheet from web usercontrol spills to main page

I

ivan.svaljek

I have a main page(aspx) with a usercontrol(ascx).

Page has <LINK href="Styles.css" type="text/css" rel="StyleSheet">

Control has <LINK href="NovostiStyle.css" type="text/css"
rel="stylesheet">

The table style defined in usercontrol's css somehow gets applied to
table elements in main page.

Is there a way to limit the scope of NovostiStyle.css to the
usercontrol only ?
 
G

Guest

Unfortunately, no, as the control gets embedded in the page. If the control
needs different formatting than the rest of the app, either apply both
stylesheets to the page, in proper order, so they "cascade" properly or have
different style names in the control that requires different formatting.

If you are formatting HTML tags, subclass them for the control.

<H1 class="controlHeader">Header in control</H1>

H.controlHeader
{
}

etc.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top