burak Posted November 24, 2004 Posted November 24, 2004 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 Quote
*Gurus* Derek Stone Posted November 24, 2004 *Gurus* Posted November 24, 2004 The "span" element is used for inline text and objects, which flow with the rest of the page's inline content. If you want to define a width and/or height, use a block-level element, such as "div". Quote Posting Guidelines
bri189a Posted November 29, 2004 Posted November 29, 2004 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.