Results 1 to 2 of 2

Thread: [resolved]asp:labels and width property

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    [resolved]asp:labels and width property

    Ahoy

    Been trying to set the width of my asp:label controls in my css, but the browser (IE & firefox) is not picking it up. It picks up the other styles, just not the width. It works fine with other asp controls (textboxes / grids / etc.), just not the label control.

    Anyone know how to fix this?

    Thanks
    Patch
    Last edited by Patch21; Aug 29th, 2005 at 10:10 AM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: [resolved]asp:labels and width property

    Nevermind...found out what was wrong (i think).

    You need to put display:block into the style, along with the width. Reason for this, as far as I can see, is because html registers asp:labels as <span> tags, and with the doctype and firefox, you cant do anything to a span unless it has a display:block in its style.

    So instead of this, i'm using readonly textboxes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width