Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello and Happy Thanksgiving,

 

I am dynamically creating a label and assigning a

width to it.

 

Dim lbl3 As New Label

lbl3.Text = name

lbl3.Width = System.Web.UI.WebControls.Unit.Point(255)

 

This shows up as

 

<span style="width:255pt;">

 

when I do a viewsource. IE displays the width fine

but Netscape 7.1 does not preserve the width of the

span.

 

I copied the <browsercaps> xml in the following page

 

http://slingfive.com/pages/code/browserCaps/

 

into my web.config but it didn't solve my problem.

 

Do you know how can I get nescape to display the

width properly?

 

Thank you,

 

Burak

Posted
You can also get a normally inline element (such as span) to be displayed as a block element by using the style/display property... however as Derek said, you would just use DIV in this case. I often will do this trick when wanting to show links in a list instead of side by side... in reality it's just a lazy way of me avoiding the break tag in my html code.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...