stylesheet problem

R

Random

Under .NET, why doesn't the "class" attribute seem to apply to elements that
refer to a specific stylesheet reference? I've verified that the stylesheet
is being referenced by creating styles that refer specifically to HTML tags.
But if I want to call on a particular style just using the "class"
attribute, there is no stylesheet formatting being done.
 
A

avnrao

all web controls have CSSClass attribute which is your stylesheet class
attribute.

Av.
 
R

Random

It's not a web control. They're just normal, table elements.

I have this in the header...

<link type="text/css" rel="stylesheet" id="Style" runat="server" />

And script that applies the href to the stylesheet reference. I've checked
the source on the browser page and it is being applied correctly. then I
have the element...

<table class="standard">....</table>

And, of course, the class reference in the stylesheet...

standard {background-color: Aqua;font-size: 2;}

I'm posting this here because I'm wondering if it is something different
about .NET that is making this not work. I mean, "class" is a legal
attribute, but Visual Studio .NET doesn't seem to want to recognize it as
such.
 
E

EijiTek

CSS class names start with a period so your class should be named
".standard". This implies a class defined for all tags as opposed to a
class named "TD.standard" which is defined specifically for TD tags.
 

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,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top