473,387 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Stylesheet from web usercontrol spills to main page

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 ?

Nov 19 '05 #1
2 1273
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!
***************************
"iv**********@gmail.com" wrote:
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 ?

Nov 19 '05 #2
OK, thanks.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gamze | last post by:
Hi, I have a calendar control within a usercontrol. The calendar is to be used on serveral pages of a web site - hence the use of a usercontrol. I now wish to grab the value of...
1
by: Michael Evanchik | last post by:
Tying not to spaghetti code which seems to be easy to do in .net, im trying to do my main .net html in index.aspx, use repeated .net html in an .ascx files and all code im doing in .vb code behind...
2
by: Lau Lei Cheong | last post by:
Hello, I'm writing a usercontrol that contains a property named "disabled". It is set to false by default but there is also another button in the usercontrol that'll set it to true. On the...
0
by: vbMental | last post by:
I created a user control that, had a datalist with checkboxes inside of the item template. These checkboxes would not retain state. For instance, if I set them to checked inside of the load event...
9
by: Anders K. Jacobsen [DK] | last post by:
Hi I have this that adds some usercontrol (UCTodays.ascx) to a placeholder foreach(A a in B){ UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");...
9
by: Richard Brown | last post by:
Can anyone give me a good argument one way or another? I have an 'address' set of fields that are used in various situations (a client has an address, a destination has an address, etc). These...
1
by: Paul | last post by:
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...
14
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I have created a UserControl ("MyUC"). I've put a bunch of instances of that control on a Page ("Defaul.aspx"). The control works fine. Now, I want to be able to use "FindControl()" from...
2
by: J055 | last post by:
Hi I'm adding rules dynamically to the HtmlHead.StyleSheet using the CreateStyleRule method. I'd like to know how to check whether the rules already exist first. Thanks Andrew
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.