width

$(this).css("width") not working on ancohor tags in Safari

I'm using CSS selectors to generate custom pop-ups for a web templates - basically, some some the producers aren't comfortable with JS and I need an easy way for them to set pop-up sizes etc. I'm not really interested in the merits of this approach, but rather wish to understand why jquery seems to be unable to get the width and height a...

computing $(this).css(”width”) _correctly_ in Safari

Asked this question earlier today, but I think I awarded a correct answer too early. I'm trying to figure out how to grab the css length and width of an anchor element with jquery in Safari. But I keep getting "0" returned, and I was told that this was because the javascript is firing before the css is rendered - a quirk of Webkit browse...

How to Alter Column Data Type Without Affecting Existing Column Width

Hi Folks, I have an existing column of data type varchar that I need to change to nvarchar, however I do not want to alter the existing column width of (5). If I use the following statement ALTER TABLE MYTABLE ALTER COLUMN MYCOLUMN NVARCHAR (5) NOT NULL I end up with a column of nvarchar data type, but with a column width of (10)!...

How to get Flex 3 ComboBox width to adjust based on bound dataProvider contents having changed?

In Flex 3, I've created a ComboBox within an MXML component similar to the following: <mx:ComboBox id="comboBox" dataProvider="{_choices}" /> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; // etc... public function get choices():ArrayCollection { return _choices; } [Bindable] private var _choices:ArrayCollectio...

Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=devi...

Measuring the pixel width of a string in Objective C

I need to measure the pixel width of a string in objective C can anyone point me to a link that explains how to do this? I haven't found anything that explains this well. ...

Relation between length and font-size of a string and width of a textbox.

Hi to all. I've a field in a database, this field has a maximum length, and I want to set a textbox to the appropriate width. I'm creating the textboxes in runtime. How can I calculate the value of width property? For example, if I have a field nvarchar(5) named IDClient, and the font-Size is 13, I want to create a texbox with a width ...

How to make a StackPanel Width that of another StackPanel?

I have two dockpanels which each have a left StackPanel. The width of the bottom StackPanel is determined by the width of the text is in it. The width of the top StackPanel should be the same as the width of the bottom StackPanel. I've tried to bind the Width of the top StackPanel to the Width of the bottom StackPanel via ElementName ...

jQuery - Get Width of Element when Not Visible (Display: None)

It seems like in jQuery when an element is not visible width() returns 0. Makes sense, but I need to get the width of a table in order to set the width of the parent before I show the parent. As noted below, there is text in the parent, that makes the parent skew and look nasty. I want the parent to be only as wide as the table and ha...

Planewidth after bending (using pv3d, as3dmod)

Hi there, I got a huge problem. I'm stuck there for two weeks now. It's seems pretty simple. I'm creating a plane, mapping a texture to it. After that I bend it, using the bend modifier from as3dmod. Of course the plane got smaller after the bending process. I've tried to calculate the first and last vertices. var sizeAfterBending:...

What is a good maximum content area width for web pages?

Is there a standard max for the width of the main content area of a web page? I want to maximize screen real estate without affecting usability. I've seen a lot of sites stick to 980px or less. Anyone have any suggestions? ...

How can I set the default size of a jquery datepicker?

Have a look at this page. The datepicker itself (called on <div id="calendar">) has a width of "68em" set initially. I then use $("#calendar").children().css("width","auto"); to set the width to auto (so it fills up the page). As you can see, this works. Changing the month (with the buttons), however, causes jQuery to change the width ba...

Need help getting DIV inside DIV to stretch to width of contents in Firefox

I am using a layout similar to the one from Dynamic Drive here: http://www.dynamicdrive.com/style/layouts/item/css-right-frame-layout/ The main content area (white) has overflow set to auto. I have given the innerTube inside this main content area a border. However if the contents within this innerTube are greater than the width of the ...

Which is the better way of specifying HTML Fixed Column width (width or style attribute)

I would like to ask what is the better way of specifying HTML column width? the width attribute or the style attribute? Assuming I am using IE 6. Does IE render the width attribute better than style? By width attribute <table width="900"> <tr> <td width="450">A</td> <td colspan="2" width="450">B&C</td> </tr> ...

How to calculate the font's width?

I am using java to draw some text, but it is hard for me to calculate the string's width. for example: zheng中国... How long will this string occupy? ...

Cut of text if too wide in CSS or Asp.net

Hi, I have this text inside a div with a fixed width: Some headline (2009-10-10 small) Some headline (2009-10-10 small) Some headline (2009-10-10 large) But when the headline is too wide the result is: Some headline (2009-10-10 small) Some wide headline (2009-10-10 large) Some headline (2009-10-10 large) Which is not good looking ...

Latex: hfill to a certain width.

I'm currently doing something like: a\hfill{}b which puts 'a' at the far left, and 'b' at the far right of the page. However, I'd like 'b' to be exactly half way. Is there a \hfill equivalent where I can say \hfill{0.5\textwidth}? I don't know the width of 'a'. Obviously, I could use tabular, or maybe minipage, but the rest of the co...

Width of float no longer shrinks to fit when contents wrap to multiple lines

Here is a test file. Resize the window to be wide enough to hold all four boxes. Notice the container is no wider than the boxes, as intended. Resize the window to be small enough that the boxes are on more than one line. Notice the container is the full width of the page (this is unintended). Why? Is it possible to prevent this in a ...

Getting elements that exceed the maxium value. JAVASCRIPT/JQUERY

greetings, I'm new with java script so bear with me! I want to achieve something using JQuery selectors. I have a list menu. It looks like this... <ul style="width:auto"> <li>item one</li> <li>item two</li> <li>item three</li> <li>item four</li> <li>item five</li> </ul> Okay, so currently I'm using the parseInt function to retrieve...

YUI Datatable Width

This may seem like a basic question, but I'm having trouble figuring out how to set the table width to 100% on a YUI datatable. I tried doing #dtContainer { width: 100%; } #dtContainer table { width: 100% } but none of these approaches work. To clarify, I am trying to set the datatable width to 100% when the table is empty ...