width

Flash AS3: How do you calculate the width of an image loaded into a movieclip?

I am loading an image into a movie clip via AS3, and what I want to do is center the image inside the movieclip. The problem is that I can't seem to grab the width value of the image being loaded. Below is what I'm doing: imageLoader = new Loader(); imageLoader.load(new URLRequest(event.target.name)); screenBox.screenHolder.addChild(ima...

add width li's to parent ul

i would like to calculate the width of the li's for each submenu en then put in the ul element. example <ul> <li>level 1</li> <li> <ul style="widht:??;"> // total width li's added here 70px <li>level 2</li> // width of this li 20px <li>level 2</li>/ width of this li 50px </ul> </li> <li>level 1</li> <li>level 1 <ul styl...

How to set width of textbox to be same as MaxLength in ASP.NET

Is there a way I can limit the width of a textbox to be equal to the MaxLength property? In my case right now, the textbox control is placed in a table cell as in this snippet: <td class=TDSmallerBold style="width:90%"> <asp:textbox id="txtTitle" runat="server" CausesValidation="true" Text="Type a title h...

Measure width() with jQuery after DOM refresh

My script dynamically creates a <ul> width left-floating <li>s inside: it's a paginator. Afterwards, the script measures width of all <li>s and summs them up. The problem is that after the nodes are injected into the document — the browser refreshed DOM and applies CSS styles which takes a while. It has a negative effect on my script: w...

Keep width even when column changes. (HTML)

I have a login on the left sidebar of my website. When a user is logged in, the sidebar width doesn't remain the same as it was when the user wasn't logged in. Is there a way to keep the width the same? <!-- Start Sidebar --> <td id="sidebar" valign="top" height="400px" style="width: 200px"> <!-- Login Form ...

jquery animating different img widths

Hi there, I've been searching for an answer for a long time with no avail, so it's time to ask. I'm trying to use .animate() to change the size of an image once clicked. The first state of the image would be a thumbnail size, which would animate to the image's original size, then to a thumbnail again. edit: images load with 150px width...

How do I set the width and height of my swf in AS3?

How do I set the width and height of my swf in AS3? This is my code so far: package { import flash.display.Sprite; public class Game extends Sprite { } } Right now, when loaded it is at some arbitrary default size. If I can't change the size this way, is there any easy work around that will be consistent? ...

Dynamic tab width in a Flex 4 TabBar component with skin

Hi, I have a Flex 4 TabBar component with a custom skin. In this skin, the item renderer is defined with an ButtonBarButton with a custom skin. All the tabs in the itemrenderer have now the same width. The client however wants me to make the tabs width dynamically, so a smaller tab for a smaller label, a bigger one for a long label. Do...

Calculating total width of all list items?

Hi There, I have a standard UL as follows: <ul> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> </ul> I am trying to find a quick & efficient way to calculate the combined with of all the LI tags. Currently I have: var width = ...

How to set attribs in GWT?

I'm not getting any effect out of DOM.setElementAttribute, am I doing something wrong? class MyListBox extends com.google.gwt.user.client.ui.ListBox { .... protected void setHoverAutoWidth() { addDomHandler(new MouseOverHandler() { public void onMouseOver(MouseOverEvent event) { DOM.setElementAttribute(getElement()...

css width % in ie7

Hi I have a parent container which is 100%. It contains 2 floating divs which are width:50%. The children conintans only text. The problem is that the children on get as wide as the text, and not 50% of the width of the parent container. It is only ie7 that is a problem. Maybe also ie6, but I don't care about that browser. ball (width...

I need a script to make input field fill the rest of the screen relative to screen size

This below code is what I have donr. I need the third input field "description" to spread into width, according to size of the screen, but I don't know how to get there: echo("<table cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n"); echo("<tr class=\"header\" ALIGN=LEFT>\n"); echo("<th>NUmber</th>\n"); echo("<th>Descrtiption</th>...

Website the wrong width on iPhone on iOS4 when saved to Home Screen

I have a website that looks fine when viewed in Safari on an iPhone. In iOS3.x you can save it as an icon to the Home Screen and it opens fine. But in iOS4, while it still looks the correct width in Safari, if you open it direct from a Home Screen icon then it's too wide. I've spent a couple of hours fiddling with various settings of t...

ASP.NET website adjustable width

Hi, I am using a CSS template to create a website and everything is appearing as a fixed size. How may I adjust everything so that the size of the items adjust to the size of the screen please so that it stretches to the entire width of the page? Thanks. ...

Firefox table css generate tbody killing table width

I am working on taking an IE only site and making it cross browser. Everything is looking food in IE, Chrome, and safari. However firefox isn't happy. I have a table class called "datatable" it is as the name suggests a datatable. I am trying to get it to stretch to 100% of width of the div it's contained in. The div above is 100%. Whe...

Setting cross-browser width of Dijit.form.Select element

Title pretty much says it all, I have a dynamically generated Dijit.Form.Select element. I have been trying all kinds of CSS workarounds but the only browser that seems to tolerate what ever I try is Firefox. Does anybody know the correct way to set the the width of this element. I use span tags rather than the regular select/option...

How to make a div as wide as its sibling but not wider?

I have the following HTML: <div class="wrapper"> <div class="label"> foor bar baz </div> <img src="..."> </div> Yes, I know that div with class "label" should be a label. The simple question is: how do I ensure that the label is always exactly as wide as the picture and never wider? The width of the picture and the content ...

How to make textarea to fill div block?

Check out how far have I got it here: http://client.starchat.ee/social/test.html How can I make the textarea above the green button to fill the div block? I mean, I how to make the textarea exactly the same width as the comment blocks? ...

Qt setColumnWidth does not work.

Have written the following code: m_selectCategoryTableWidget = new QTableWidget; m_selectCategoryTableWidget->setRowCount(0); m_selectCategoryTableWidget->setColumnCount(2); m_selectCategoryTableWidget->setHorizontalHeaderLabels(QStringList()<<tr("Category")<<tr("Number of items")); m_selectCategoryTableWidget->verticalHeader()->setVis...

jQuery FancyBox: How do I increase the width of the element #fancybox-wrap by 10 px?

Hi, In jQuery FancyBox, I need to increase the width of the element #fancybox-wrap by 10 px. What is the easiest way to achieve this? Thanks. ...