CSS3 PIE Forums
http://css3pie.com/forum/

Adding css from code-behind
http://css3pie.com/forum/viewtopic.php?f=3&t=2006
Page 1 of 1

Author:  silverstruk [ Wed Mar 06, 2013 7:09 pm ]
Post subject:  Adding css from code-behind

Hi,

I am using VB.NET and adding controls from code-behind with css class that uses PIE. When the controls are renedered, the css applies only partialy (only text color). When I add controls with jQuery, it all works just fine. The browser is IE8.

CSS:
Code:
.resource
{
    padding: 5px;
    background-color: #f2a32a;
    color: White;
    border: 1px solid #3C6F91;
    border-radius: 15px;
    behavior: url('lib/pie/PIE.htc');
}


VB.NET
Code:
Dim lblRes As New Label
            lblRes.CssClass = "resource"
            lblRes.ID = resource.ID
            lblRes.Text = resource.Resource


jQuery
Code:
$('#<%=tblEdit.ClientID%>  tbody > tr:first').after(
                    '<tr class="trRes"><td align="right"><input type="button" id="delete" name="delete" value="Remove" class="deleteRes"></input></td>' +
                    '<td><span class="resource" id="' + res.val() + '"></td></tr>');


The controls are being added in the table. The problem is with <span>.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/