J
Jeff Evans
OK, this one has me totally baffled. Please go to:
http://www.uiucsingles.com/
Notice the left div (class="navDiv"). For some reason the control that
renders this section of the page is outputting different tags to different
browsers, when using HtmlTextWriterAttribute and
HtmlTextWriterTag. For testing purposes, here is how the Render function
looks when the user is not logged in:
output.Write("<div class=\"navDiv\">...</div>");
and when the user IS logged in:
output.AddAttribute(HtmlTextWriterAttribute.Class,"navDiv");
output.RenderBeginTag(HtmlTextWriterTag.Div);
....
output.RenderEndTag();
In theory these should produce the same result. But for some reason, in the
non-IE browsers I tested (Firefox 1.0 and Opera 7.23), the latter case
results in a tag that looks like this:
<table class="navDiv" cellpadding="0" cellspacing="0" border="0"
width="100%"><tr><td>(stuff in the div)</td></tr></table>
It's not just with this control either. Any time I use the TextWriter
attribute/tag write methods with a div, I get the funky table in Firefox and
Opera (check out the header). But to make matters worse, IE always seems to
get the correct tag of:
<div class="navDiv">(stuff in div)</div>
Has anyone encountered anything like this before? I guess if I can't figure
out what is going on I will just manually output the proper tags. Grr...
http://www.uiucsingles.com/
Notice the left div (class="navDiv"). For some reason the control that
renders this section of the page is outputting different tags to different
browsers, when using HtmlTextWriterAttribute and
HtmlTextWriterTag. For testing purposes, here is how the Render function
looks when the user is not logged in:
output.Write("<div class=\"navDiv\">...</div>");
and when the user IS logged in:
output.AddAttribute(HtmlTextWriterAttribute.Class,"navDiv");
output.RenderBeginTag(HtmlTextWriterTag.Div);
....
output.RenderEndTag();
In theory these should produce the same result. But for some reason, in the
non-IE browsers I tested (Firefox 1.0 and Opera 7.23), the latter case
results in a tag that looks like this:
<table class="navDiv" cellpadding="0" cellspacing="0" border="0"
width="100%"><tr><td>(stuff in the div)</td></tr></table>
It's not just with this control either. Any time I use the TextWriter
attribute/tag write methods with a div, I get the funky table in Firefox and
Opera (check out the header). But to make matters worse, IE always seems to
get the correct tag of:
<div class="navDiv">(stuff in div)</div>
Has anyone encountered anything like this before? I guess if I can't figure
out what is going on I will just manually output the proper tags. Grr...