User-2133570912 posted
give ur bar an id and runat="server" tag...so that it's accessible in the code behind...
now...suppose id is "bar"...then u can do this...
bar.Style.Add("Width","100px");
or say
bar.Style.Add("Width","Auto"); //it shud wrk as per ur objective....
//this codes shows how dynamically u can control style attributes of any HtmlControl (i.e. controls like divs,
spans, asp contrls etc on designer)....
don't forget to "mark as an answer" if ur problem is resolved due to this......