float

Added a Facebook badge, throwing off footer placement

Added the for the facebook badge to the site and now it's thrown my placement for the footer off .. it's working fine in Chrome, but IE, FFox and Opera all experiencing problems... Here is a screenshot: The footer (brown bar) is supposed to be at the bottom... Here is the CSS : /* footer */ #footer{ background:url(../imag...

CSS layout - Aligning two divs side by side

Hello, I have a small problem. I am trying to align two divs side by side using CSS, however, I would like the center div to be positioned horizontally central in the page, I achieved this by using: #page-wrap { margin 0 auto; } Thats worked fine. The second div I would like positioned to the left side of the central page wrap but I ...

How is the image floating implemented in the new Google Docs?

The new Google Docs allow an image to be placed in the middle of the text, something like "float: center" if it existed in HTML/CSS. As this is impossible to achieve in HTML/CSS, I was wondering how is this implemented? Some JavaScript taking over the native rendering of text paragraphs? Out of curiosity, I downloaded such document as a...

Precision error on matrix multiplication

Hello all, Coding a matrix multiplication in my program, I get precision errors (inaccurate results for large matrices). Here's my code. The current object has data stored in a flattened array, row after row. Other matrix B has data stored in a flattened array, column after column (so I can use pointer arithmetic). protected double[,]...

vb.net what is a good way of displaying a decimal with a given maximum length

I am writing a custom totaling method for a grid view. I am totaling fairly large numbers so I'd like to use a decimal to get the total. The problem is I need to control the maximum length of the total number. To solve this problem I started using float but it doesn't seem to support large enough numbers, I get this in the totals column(...

For what purpose does java have a float primitive type?

Can you help me clarify the usages of the float primitive in Java? My understanding is that converting a float value to double and vice-versa can be problematic. I read (rather long time ago and not sure that it's actual true anymore with new JVMs) that float's performance is much worse than double's. And of course floats have less prec...

How to make a div float in and scroll with the center of page?

So, I work on a Facebook FBML App. What I want is simple. Just have a div shows in the center of the page, and scroll with the page. i.e. always in the center. It would be easy with normal JS. I just use the pageYOffset However, in Facebook using FBJS, I am not sure what I should use. It doesn't have getPageYOffset().. and I tried ...

Make HTML content area fit to viewport height?

I just made this demo extracting out what I'm trying to accomplish: Autosize Main Content Area I want the pink/yellow area to act according to these rules: Minimum height is the size of its content (which is variable) IF content size is smaller than viewport size Otherwise minimum height is such that it adjusts to fill the window...

CSS Float statement

.float1 { float: left; width: 50%; height: 50%; } .float2 { float: right; width: 50%; height: 50%; } .float3 { float: left; width: 50%; height: 50%; } .float4 { float: right; width: 50%; height: 50%; } .clear { clear: both; } HTML: <div class="float1">Float 1</div> <div class="float2">Float 2</div> <div class="clear"></div> <div c...

IE7 rendering bug: Heading before a floated list

Can somebody please explain this IE7 bug to me? It occurs in Standards and Quirks mode rendering, it does not occur in Firefox, Chrome or IE8 (though switching the rendering engine via IE8 developer tools will provoke it). Here's the HTML to reproduce the behavior: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/...

Error in rounding off values using .round in Ruby

The following piece of code works perfectly in script/console but returns the following error when i compile the same in a ruby script.: :in `round': wrong number of arguments (1 for 0) (ArgumentError) tf={"ph"=>{0=>1.33333333333333, 1=>1.5}, "fee"=>{0=>1.66666666666667}, "test"=>{0=>1.16666666666667, 1=>1.25}, "what"=>{0=>2.0, 1=>2.0}...

floated div drops when height of above DIV is greater than X

hi css: .listingContainer { margin:auto; overflow:hidden; padding:0 0 16px 16px; width:660px; } .listingItem { float:left; margin:0 2% 3% 3%; min-height:250px; width:44.999%; } html: <div class="listingContainer"> <div class="listingItem"> <p>Some Content</p> </div> <div class="listin...

How does GDI+ support floating point values?

Given that GDI+ is a wrapper around GDI, how does it handle floating point values? I don't see any support for floating point co-ordinates in the GDI documentation. ...

C int, float, double

There are certain int values that a float can not represent. However, can a double represent all values a float can represent? (My intuition says yes, since double has more fractional bits & more exponent bits, but there might be some silly gotchas that I'm missing). Thanks! ...

Float right is making background-color disappear in IE while hovering.

Everything works OK in this language menu: http://alexchen.co.nr/beta (top right of the page). But I want the li elements to float to the right. But when I add float:right to #lang li a the background-color stop working while hovering when I hover them in IE7. #lang { float: right; padding: 50px 25px 0 0px; margin: 0 0 0 0p...

Issue with css float -- Hindering IE6 from putting div in next line

Hi, I've got an issue with floating divs in IE6. There's one navigation div on the left and one content div for the rest of the page. They've got the following css values: #navigation { float: left; width: 185px; padding-left: 5px; overflow: auto; height: 100%; } #content { overflow: auto; height: 100%; } ...

Li with float in IE6/7. It disappears?

Hi guys. Try test this code in IE 6/7: <html> <head> <title>Title</title> </head> <body> <ul> <li style="float:left">huisashaiuhs iuhuiahsiuhsaiu</li> </ul> </body> </html> Where is the circle of LI? I already do ALL types of workaround, in UL and LI. Nothing, NOTHING works. Do you have any idea? (BTW already tried hasL...

Python's behavior for rich comparison (Or, when Decimal('100.0') < .01)

So I have a one liner: import decimal; h = decimal.Decimal('100.0'); (h > .01, h < .01, h.__gt__(.01), h.__lt__(.01)) All it does is make a Decimal object holding 100.0, and compares it to .01 (the float) in various ways. My result is: >>> import decimal; h = decimal.Decimal('100.0'); (h > .01, h < .01, h.__gt__(.01), h.__lt__(.01))...

What is a Bias Value of Floating Point Numbers?

In learning how floating point numbers are represented in computers I have come across the term "bias value" that I do not quite understand. The bias value in floating point numbers has to do with the negative and positiveness of the exponent part of a floating point number. The bias value of a floating point number is 127 which means ...

Convert NSFileSystemSize to Gigabytes

I need to convert NSFileSystemSize to Gigabytes. NSDictionary * fsAttributes = [ [NSFileManager defaultManager] fileSystemAttributesAtPath:NSTemporaryDirectory()]; NSNumber *totalSize = [fsAttributes objectForKey:NSFileSystemSize]; NSString *sizeInGB = [NSString stringWithFormat:@"\n\n %3.2f GB",[totalSize floatValue] / 107374824...