N
NancyASAP
I have a label on my ASP.NET form. It has a cssclass that includes a
background color.
I am dynamically putting text in this label. The text contains some
embedded html (I want to display part of label contents as a list so it
uses <ul> and <li>). The format of the string assigned to label text
looks like this:
"An error occurred:<ul><li>message 1</li><li>message2</li></ul>"
The label renders in both browsers the same. Here's the actual
rendering from Mozilla, with some of text missing for brevity:
<span id="lblValidateMessages" class="validationsummary">Doc is
invalid. Validation indicates these errors: <ul><li>Forceable error #3:
Activity Id.</li><li>Forceable error #5: WPD Id</li><li>Non-forceable
error #99: Doc Thru Date</li></ul></span>
This renders great in IE 6. In Mozilla 1.73, only the first line of the
label has a background color. As soon as it reaches the embedded <ul>,
the background color turns off.
I have played around with using a literal control instead, but for
various reasons I decided not to use it (esp. since it doesn't have a
cssclass attribute).
Interestingly, when I change the string to include a "class" attribute
on the <ul> tag <ul class='validationsummary'>, in Mozilla I get the
all text inside the <ul> in the correct bgcolor, but I ALSO get a
vertical space of about one line width before the <ul> text WITHOUT the
background color.
I'm sure this is just another browser-specific css rendering problem...
but any ideas on how to correct this?
Thanks!
NancyASAP
background color.
I am dynamically putting text in this label. The text contains some
embedded html (I want to display part of label contents as a list so it
uses <ul> and <li>). The format of the string assigned to label text
looks like this:
"An error occurred:<ul><li>message 1</li><li>message2</li></ul>"
The label renders in both browsers the same. Here's the actual
rendering from Mozilla, with some of text missing for brevity:
<span id="lblValidateMessages" class="validationsummary">Doc is
invalid. Validation indicates these errors: <ul><li>Forceable error #3:
Activity Id.</li><li>Forceable error #5: WPD Id</li><li>Non-forceable
error #99: Doc Thru Date</li></ul></span>
This renders great in IE 6. In Mozilla 1.73, only the first line of the
label has a background color. As soon as it reaches the embedded <ul>,
the background color turns off.
I have played around with using a literal control instead, but for
various reasons I decided not to use it (esp. since it doesn't have a
cssclass attribute).
Interestingly, when I change the string to include a "class" attribute
on the <ul> tag <ul class='validationsummary'>, in Mozilla I get the
all text inside the <ul> in the correct bgcolor, but I ALSO get a
vertical space of about one line width before the <ul> text WITHOUT the
background color.
I'm sure this is just another browser-specific css rendering problem...
but any ideas on how to correct this?
Thanks!
NancyASAP