page rendered differently between IE6 and IE7

  • Thread starter Thread starter Mich
  • Start date Start date
M

Mich

Hi,

i made an application where a lot of radiobuttonlists are created
dynamically. Some are visible and others are hidden until the right
selectedvalue is chosen. Thsi works perfectly with IE7, Netscape, Firefox
...., but with IE6, there are big gaps between the radiobuttonlists.

I looked at the source of both browser versions, but there is no difference.
The difference is in the way of rendering the html code.

I suspect that this line of the source: <div style="height:5px"> is
interpreted differently. I tried with height:1px" but there was no
difference in IE6. Only if i commented it the gap was closed. In IE7, this
line creates a little gap between the two radios.

I also noticed that a hidden radiobuttonlist is representd by this line
(with 2 </di> !!)

<div align="left"
style="width:800px;height:0px">&nbsp;&nbsp;<br></div></div>

Here a sample of the code-behind:

rb(i) = New RadioButtonList
If Session("visible" & vlg) = "n" Then
rb(i).Visible = False
littd(i) = New LiteralControl("<div align=""left""
style=""width:800px;height:0px"">")
Else
littd(i) = New LiteralControl("<div align=""left""
style=""width:800px;background-color:lightsteelblue"">")
End If
frm.Controls.Add(littd(i))
If cond = False Then
lit = New LiteralControl("<div style=""height:5px"">")
frm.Controls.Add(lit)
End If
lit = New LiteralControl("</div>")
frm.Controls.Add(lit)

Thanks for help

Mich
 
how different is it being rendered???

if you set the height/width as 5px, ie7 will do it 5px while ie6 will
stretch the div to the control size..
 
Back
Top