Hello,
I have an Asp:Label which CSS class is "style":
.style
{
border-color: #303030;
border-style: solid;
border-width: 1px;
display: block;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
font-weight: normal;
margin: 10px;
padding: 10px;
text-align: center;
text-decoration: none;
text-indent: 0px;
}
Only the "display:block", "margin" and "padding" are applied to the
label. The text and border styles are no applied.
I tried with asp:textbox and same thing happens.
I am using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
It works if I use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The problem is I need to use the first one.
Can somebody explain to me what is going on here?
Thanks,
Miguel
Klaus H. Probst - 15 Jul 2005 06:31 GMT
The HTML 4.x is IE's "quirks mode". It's sloppy. By using the XHTML DOCTYPE
you're telling it that it should use a set of different "rules" to parse
your markup and apply styles to it. That's why you're seeing different
results.

Signature
Klaus H. Probst, MVP
http://www.simulplex.net/
> Hello,
>
[quoted text clipped - 33 lines]
> Thanks,
> Miguel
Patrick Olurotimi Ige - 15 Jul 2005 08:23 GMT
Are you using the CssClass in the label to specify your CSS?
For borders and co use the properties of the label.
Patrick
Shapper - 15 Jul 2005 09:18 GMT
Yes.
Something like <asp:label id="mylabel" runat="server" cssclass="myclass"
...
Thanks,
Miguel
"Patrick Olurotimi Ige" <naijacoder@hotmail.com> wrote in message
news:naijacoder@hotmail.com:
> Are you using the CssClass in the label to specify your CSS?
> For borders and co use the properties of the label.
> Patrick
>
> *** Sent via Developersdex http://www.developersdex.com ***