width

Getting terminal width in C?

I've been looking for a way to get the terminal width from within my C program. What I keep coming up with is something along the lines of: #include <sys/ioctl.h> #include <stdio.h> int main (void) { struct ttysize ts; ioctl(0, TIOCGSIZE, &ts); printf ("lines %d\n", ts.ts_lines); printf ("columns %d\n", ts.ts_cols); } ...

How to make a div to fill a remaining horizontal space (a very simple but annoying problem for CSS experts)

I have 2 divs: one in the left side and one in the right side of my page. The one in the left side has fixed width and I want the one of the right side to fill the remaining space. The one on the right side is the navigation and I want it to to fill the remaining space on it right side: My CSS: #search { width: 160px; height: ...

Is it possible to adjust the width of a UITableViewCell?

I would like to know if it is possible to adjust the width of a UITableViewCell. I would like to put an image to the left of it (like the Contact view in Address Book). I found a post here that provides a picture of exactly what I am trying to accomplish. I would also like to confirm the answers to this post. ...

Column width of a DataGrid in a Windows Mobile Application

I'm having problems trying to adjust the width of a column of a datagrid. I used the answer posted here, but I can't solve it. I'm using a List of objects as a datasource. In this simple example, I have just created a smart device application, and just added a datagrid. Then my code is this one: public Form1() { ...

How do I Get Height & Width from an Uploaded image file

I am using ASP.NET 2.0. I am trying to get the height & width of an image file I uploaded using the FileUpload control. Once uploaded, the image is kept in the db, not the file system. It seems I should be able to use something like the following code to do this but I can't get it to work. Dim strm As Stream = oPostedFile.InputStream d...

How do I get around the IE CSS percentage rounding problem?

I'm trying to create a dynamic site where I have three floating boxes next to eachother. They are 33.33% in width each. The container div around them is 75% in width. I've found an article about the problem here: CSS: Jumping columns I've also found an example of the same problem here: Jumping columns example Drag the window size to ...

Inline Elements With Width

This question seems to be asked freqeuently over the internet but I still can't find a solution. I have this navigation bar (It switches between tabs using jQuery) which displays inline. I'm showing a background image on these and to make them more definitive I need to make them wider and higher. <div id="tabs"> <ul id="tabs-nav-cont">...

How can I make a column in a listbox in WPF the same width for all items?

I have a ListBox with an ItemTemplate consisting of a TextBlock and a ComboBox. The problem is that the width of the text inside the TextBlock is not the same for each item and the ComboBox controls are not aligned. How can I set the TextBlock in the template so all items are the same width, that is the one of the widest? Here is my xam...

WPF ListBox fixed width

I have a ListBox in a PopupControl. Problem is that while scrolling, Popup resizes to fit the actual widest element. How to avoid this resizing and adjust automatically to the widest element in the whole list? I tried to put it in a Grid but without succes. ...

Width of input type=text element

How come when I do this: <input type="text" style="width: 10px; padding: 2px"/> <div style="width: 10px; border: solid 1px black; padding: 2px">&nbsp;</div> the input ends up 2 px wider than the div in both IE6 and FF3? What am I missing? EDIT: As many people have said, the border is the issue. If I set border: 0px on the input, it w...

How to make 2nd element get rest of the horizontal space

I want to make first input have the width 100% and second + image = 100% so that second input get the rest of the space (100%-img size) on the same line. Is it possible to do using CSS? <html><head><title>width test</title> <style type="text/css"> .t { width: 100%; table-layout:fixed; } .caption { text-align: left; wid...

WebBrowser control Resize C#

I have a webrowser in my form that accesses a website that is too wide for the control. I would like to know if there is a way to resize the control to fit the website. It seems simple, but i have not found a way yet. I know how to resize the control, I just need to find the width of the website. Just like when you press the green button...

Increase in field length will result in data loss ?

Hi, If we increase the field width [say varchar(7) to varchar(20)] will it result in data loss? This is to be done in Firebird 1.5 database. Thank you. ...

Width of Headers (H1, H2 etc)

I want my headers (h1 through h6) to have a background colour (different to that of the page background), I also want the width of this background to be the same as the width of the text in the header, plus padding (Not the width of the container that the header is in, which is what is happening now). There isn't much point in me showin...

Make narrow characters with CSS.

How do I reduce characters' width of Arial-like fonts with CSS? ...

100% width header doesn't fill browser

When the browser window is small enough to force a horizontal scrollbar and you scroll right the background color of the header ends before the edge of the browser. I am using a css class. .s_header { margin: 0; width: 100%; display: block; border-bottom: 1px solid #000; background-color:#b8dbec; height:133px; } ...

Limit width of custom list itemrenderer in Flex

I'm using a custom itemrenderer to display a list of photos and need to know how to control the width. At the moment it does this: Which, as I'm sure you'll agree, is eye-bleedingly ugly. The list is created like this: <mx:Panel width="100%" height="100%" layout="absolute" title="Photos"> <mx:List x="0" y="0" width="100%" height...

css: Problem with width and padding in IE

I'm having a problem with widths on input[text] fields in IE, all versions. I have a div with an explicitly set width of 250px. In this div, I have an input text field with width set to 100%. This input also has an internal left-padding of 10px. In IE, it renders the width as 100% + 10px. I cannot figure out a technique for constraini...

Importing HTML Table into Excel via clipboard

I want to copy tabular data to Excel from my app. The most simple way I found so far was using HTML as the intermediary format. After reading this question, I could preserve the formatting of my data. Is there a way to keep the width of the columns, too? I tried to set the style in various ways: <td style="width:100;">...</td> <td style...

How to make a div size automatically, but keep it from breaking at the window's edge?

I have a pure CSS rollover menu that displays a sub nav on rollover. I would like the width of this sub nav to be whatever it needs to be for the content to display (i.e. I do not want to hard code a width in the CSS). However, if I don't hard code a width in the CSS, the div breaks near the edge of the window and the content wraps. If I...