width

Limit width of child div to width of the parent div (IE8 quirks mode)

I'm having trouble with a layout I'm trying to achieve. I have three divs on a page all with attribute float: left. Third div is dynamically filled, and shown or hidden, using jquery with content depending on what is hovered over in the second div. Third div has two child divs, of which the second div can potentially have many, many span...

Calculate rectangle width and height from diagonal and rotation

Hello, I have a rotate rectangle and I know the size of the diagonal. I also know the angle used to rotate the rectangle. How can I calculate the width and height of the rectangle? For a sketch of the problem, see: ...

How does JavaScript object `window.screen.width` detect my ScreenResolution in Ubuntu 10.4

How does JavaScript object window.screen.width detect my ScreenResolution in Firefox under Ubuntu 10.4? I mean what it accesses in OS to retrieve this data - OS variable or OS config files like a) .xprofile, b) kdm/gdm, c) xorg.conf. ? ...

PHP: test line length for wrapping

How can I test if a chunk exceeds the image size and wrap that text to the next line. Not sure if I am even doing this correctly with my if statement. $text="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem http://somelongurl.com/then-we-make-it-super-long-with-some-more/ Lorem Ipsum Lorem Ipsum Lorem Ipsum"; $string_chunks = explode(' ', $te...

How to get a row's width to fit to the width of the other rows in a table? (html)

In the following table, the first cell content is dynamically generated. The long text in the second cell causes the table width to grow beyond what is needed to fit the first cell. How can I get the bottom cell to wrap to another row, instead of widening the table? I can't use a fixed width for the second cell, because the first cell ...

Fixed-width HTML table with scrolling column group – is it possible?

A friend of mine asked me a question that I couldn't answer or figure out yet. The problem is: he wants to make an HTML table having width of 100% and many columns, of which the first one (or two) should be always visible, while others should scroll if their total width is higher than [width of the table (100%) minus width of the first ...

How to change width to fill the remaining space (CSS)

Take a look : Result should be ...

how to change height of div to covered the text area (CSS)

Orginal CSS Code http://www.faressoft.org/BlueCristalTheme/postView.php Result should be ...

UITextField resize width like safari on iPhone

How do I resize the UITextField when clicked with, like the search bar in mobile Safari? ...

Why does my HTML page have extra width in IE7?

My HTML page has extra width, but only in IE7. I get horizontal scroll bars even though all the content of the page seems to fit in the browser window. Take a look: Video: http://www.youtube.com/watch?v=_cxGzcTodTk HTML page: http://photoshop.faressoft.org/ ...

How to adjust \listing package width in Latex Editor (LEd)

Hi, I am trying to use the \listing package to include some .cpp files into my article. I add: \usepackage{listings} And then I use \lstinputlisting[language=c++]{File.cpp} The problem is that the width is not adjusted, so the code is cutted. Which is the solution? ...

How to stretch the width of an element, so that it is (100% - widths of its siblings)?

Say, I have the following unordered list. The button has width: auto. How do I style the elements, so #textField would stretch as much as possible, so the width of #textField and the button would add up to 100%? <ul> <li> <input id="textField" type="text" /><input type="button" /> </li> </ul> ...

A List in alphabetical order going down not across?

I have a giant list that comes out of my database in alphabetical order. It is placed in a Div with a set width. I have each floated left and the are all next to each going from left to right and its great. BUT my client wants the order to go down not across. So it is like this: apple angry antler bone beard broken She wants: ap...

DIV Displays Wider in IE8 works in FireFox, Safari, IE8 compat. Mode

Hello, I recently have attempted to add a line of "Social Media Icons" inside of a website. After creating a DIV and applying the properties everything looks fine in FireFox, Safari, and Internet Explorer 8 Compatability mode. However, viewing the page in IE8 makes the DIV look like one pixel wider on the right-hand side. Also increasin...

How can you set a custom tab label width in Android

Hello. I have a Tabhost in a horizontal scrollview that contains 8 tabs. The Label space for each tab is small and many of the labels have to scroll to be viewable. Is there anyway to make the tab labels bigger? This is my layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertic...

HTML/CSS: Expanding a float-left element to remaining width of parent

For the life of me I can't figure this out. I have a container div with a specific width. And a few children div inside it. I want the last div to expand its width to fill in the remaining width left in the container. How can I do this? Here's an example (also at http://jsfiddle.net/nbKAr/): <div id="container"> <div>a</div> <d...

CSS: 100% width or height while keeping aspect ratio?

Currently, with STYLE, i can use "width: 100%" and "auto" on the height (or vice versa)... but i still can't constrain the image into a specific position, either being too wide or too tall, respectively... any ideas? ...

Why is child grid not expanding to fill parent grid width?

The grid I'm targeting is the one with background color azure: Somehow it does not go to the full width of LayoutRoot, and setting it's width programmatically will cause a layoutcycle exception. I've also tried binding the width to parent layout... but that didn't seem to work either :( <Border Style="{StaticResource ZoomBorderStyle}">...

How to get a DIV to be the correct width in IE8?

This sounds pretty simple, but I am stuck. I need to set a DIV to be 434 pixels wide in IE8. The following is my code. This works in FF, but IE8 always renders the DIV with a width of 414 pixels. Why does it chop off 20 pixels? <html> <head> <style type="text/css"> #box { width:434px; background-color:red...

Workaround rendering bug in IE quirks mode

I'm trying to get a simple HTML/CSS page to work as an eBay template, however it fails to render properly in IE. Thanks to eBay's HTML choices, the listing will always render in quirks mode (no doctype reference in the listing's iframe). The problem only arises when a browser window is narrower than the listing asks for (~1000px). I've t...