I'm having an issue dynamically setting the width of a ul element in my website.
Below is the jQuery I'm uusing
var button = $("#navbar");
alert(button);
var count = $("#header li").length;
alert(count);
$("#navbar").style.Width = count * 110
Here's the HTML
<div id="header" class="clearfix">
<div class="clearfix hidden">
<img src="/Content/Images/main-logo.png">
</div>
<div id="navbar">
<ul>
<li id="home">
home
</li>
<li id="portfolio">
portfolio
</li>
<li id="about">
about
</li>
</ul>
</div>
</div>
The "alert(button)" returns [object Object] so it's not null (at least my understanding of it) but I get the error mentioned in the title whenever I try to set the width of it.
Anyone know what I'm doing wrong?