page rendered differently between IE6 and IE7

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
 
C

Christiano

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..
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top