width

jQuery: width() not working

hi all, here's my simple code: var msgbox = $("<div style='width:320px;height:200px;'></div>"); alert(msgbox.width()); the alert gives me zero - what's wrong? why isn't it 320? thx ...

Flex 4 fileReference selected image file dimmensions (width and height)

Hello! I use a fileReference.browse() to select an image file from the harddrive. How can I check the Width and Height of the selected image file please? Thank you! ...

Adjusting navigation bar to fit width of screen

I'm experimenting with making horizontal navigation bars. The links are white text within black backgrounds that run together to make it a continuous bar. The width of the bar is defined by setting the width of the elements in the css a{width:number;}. How do I make it so that the bar automatically adjusts to fill the width of the wi...

netStream Client.onMetaData not recieving width/height

hello, i search the forum but i cant find answer i am streaming flv video,everything works fine, but client i have added to netStream is recieving(via onMeatData function) only this parameters canSeekToEnd, audiocodecid, duration, videocodecid, if is not posibble get width and height from metadata how i can get them? thank you for ...

Why does 'padding' sometimes count inside an element width, and sometimes not?

I've made a bookmarklet that, among other things, loads a form in a "popup" div. I reset every CSS tag known to mankind on every element I create, and as far as I can tell examining it in firebug, no CSS tag is "bleeding through". However, on some pages, the input width includes its padding: input.clientWidth = input.style.width on ot...

Make an image width 100% of parent div, but not bigger than its own width.

Hi. I’m trying to get an image (dynamically placed, with no restrictions on dimensions) to be as wide as its parent div, but only as long as that width isn’t wider than its own width at 100%. I’ve tried this, to no avail: img { width: 100%; height: auto; max-width: 100%; } Many of these images are way wider than their pare...

Group should scroll vertically but is expanding to infinite in width

I have a group for which I want to enable horizontal scrolling. Vertically the group should be as wide as possible (100%). <s:Scroller left="0" right="0" top="0" bottom="0" visible="{isVisible}" horizontalScrollPolicy="off" includeIn="stateA"> <comps:MyComp horizontalScrollPosition="0" verticalSc...

CSS Width problem

I'd like to create a div that has the same width as the text's length inside it. I can do it without problem when the div is inside a DOM element that has enough width to fit the text in. But when I put my text holder div inside another div that is not wide enough the text will be fractioned into lines even if I set the text holder div'...

CSS: How do I make a horizontal (UL) list keeping each item at a uniform width?

That is, without defining a specific 'width' amount for each individual item. As in, the widest element (by its content) sets the width for each of the other elements. Additionally, how do I span said list 100% across its container, also keeping each item the same width? ...

Setting html document width to fit text

I have an html document that is included as an iframe in a toolbar. The document includes a single line of text. I wish to limit the width of the document, so that it doesn't exceed a maximal width, but can occupy less if the text is short. How can this be achieved? If helpful, the document is actually a php document and I can use jav...

Setting the width of radio buttons when using jQueryUI

I am using jQuery UI radio buttons, and can't find how to set them all to be a fixed width. The code I'm using is: <script type="text/javascript"> $(document).ready(function () { $("#radio").buttonset(); }); </script> <div id="radio"> <input type="radio" id="radio1" name="radio" /><label for="radio1">A</label> ...

how to get width in pixels of view with android:layout_width="wrap_content"?

I have view, which have layout_width="wrap_content". If i use view.getWidth() in code, it returns 0. :-( How can I convert width of view "wrap_content" to pixels? ...

set extended ImageView width and height programatically - android

I have a custom class that extends ImageView that I'm programatically putting on to a RelativeLayout. I want each one of these images to be a specific width and height. I've tried setting the width/height in code with LayoutParams and with setMaxWidth/setMaxHeight...neither seem to be working. Here is the code from the constructor of ...

Convert css width string to regular number

While trying to compute the width of an hidden element I found that jquery.width() returns 0 for that elements' width. I found out that using jquery.css('width') would return the correct width by using the declared style width (even if that value is different from the initial stylesheet). The problem is that the css('width') method re...

Can we recognise '%' & 'px' in jQuery ?

When reading width of DIV section, the result comes in %. But, I want to convert it in pixel value. How is it possible ? I have a class "h" defined in my html. It has width="100%". It's parent div has width="69%". width = ($(this).find('.h').width()) So actually the width is not window.width() but it is 69% of it. I want it in pixel ...

How can I animate the opposite way?

Greetings, I am changing the width of an element which serves as a bar , and that works. However I can't make it so that it animates it in the opposite direction. I tried putting - in front of bar_width but to no avail. Width will be dynamically calculated it's just that I want the direction to go to the left rather than to the right...

Different sized tabs in Android

I have an application with 4 tabs. By default every tab width is 1/4 of the screen width. How can I override this? I need the tabs to have a different width for each one. Any ideas on how to accomplish that? ...

What's the difference between img width&height property and CSS width&height?

The HTML tag img can have width and height property, while it can also have CSS style width and height. <img src="xxx.img" width="16" height="16" style="width: 16px; height: 16px"></img> What's the difference between the HTML property and CSS attributes? Should they have same effects? ...

Content of div not restricted by div width

Hi! I could swear I've seen articles about this problem, but I can't for the life of me find them again! Basically if I have <div style="width: 250px;">The width of this div should be no less than 250px wide</div> In the code below, the content in the div isn't restricting it's width to the width specified causing an overflow problem...

Android get width returns 0

I creating all of the elements in my android project dynamically. I am trying to get the width and height of the button so that I can rotate the button around. Just trying to learn how to work with the android language. However, it is returning 0. I did some research and I keep seeing that it needs to be done somewhere other than in the ...