width

Media Queries min-width not firing correctly in Opera, FF and IE

自闭症网瘾萝莉.ら 提交于 2019-12-04 15:43:39
I use media queries on a page http://test.lovecpokladu.cz/detail-mince?id=2461 like this: @media all and (min-width: 660px) { ... styles for box decoration ... } and use this meta viewport tag: <meta name="viewport" content="width=device-width, initial-scale=1.0"/> When I resize Chrome's window to 660px (measuring just the HTML page, not window borders), styles apply correctly. Styles don't apply in 659px, which is correct. Problem is with Opera, IE and Firefox. The styles apply as soons as width hits about 642px :( I observe these browsers firing min-width sooner at more content even in max

Setting a table to display: block

一曲冷凌霜 提交于 2019-12-04 15:00:02
I like to get my table behave like a block element. I cannot set it to width:100% because it does have some padding, this is going to result 100% + the paddings PX. Check out: http://jsfiddle.net/LScqQ Finally the table does what I want, can you see the box-shadow? But the table children don't like it that way^^ I guess the TH inside the THEAD are the problem. They do not get the aspected ratio of 66% to 33%. Help wanted... Your table should be display: table . If you're worried about the sizing, use box-sizing: content-box . The reason is that display: table creates the table layout mechanism

iPhone 4 web-app browser width: 960 or 981?

元气小坏坏 提交于 2019-12-04 14:51:42
<html> <body REMonload="document.location.assign('index2.php?w=' + window.innerWidth + '&h=' + window.innerHeight);"> <script language="javascript"> document.write('w=' + window.innerWidth + '&h=' + window.innerHeight); </script> </body> </html> Output: w=981&h=425 Why? Wikipedia says, w should be 960. Regards, UPDATE I've found out, the problem was related to viewport meta tag. The following code does what I want to see: <html style="width:100%; height:100%;"> <head> <meta name="viewport" content="width=device-width; initial-scale=0.5; minimum-scale=0.5; maximum-scale=0.5; user-scalable=no;"

Getting SVG container size in snapSVG?

为君一笑 提交于 2019-12-04 14:42:26
What is the correct way to get the size of the 'paper' object with SnapSVG, as soon as it has been created? My HTML looks something as follows: <div id="myContainer" style="width: 900px; height: 100px" /> And then the Javascript code: function initViewer(elementId) { var element, elementRef, snap; elementRef = '#' + elementId; element = $(elementRef); element.append('<svg style="width: ' + element.width() + 'px; height: ' + element.height() + 'px; border: solid 1px black;"/>'); snap = Snap(elementRef + ' svg'); console.log(snap.getBBox()); } What I observe here is the bounding box has '0' for

UIPickerView Width in iOS8 Swift

不打扰是莪最后的温柔 提交于 2019-12-04 14:37:51
I simply can not find out how to get a width of a component on my UIPickerView. It's not allowing something simple (Int) as it needs to be CGFloat. What exactly do I put in the <#code#> section? func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { <#code#> } Thank you! That method doesn't "get a width of a component..." The picker view calls that method to ask you how wide a component should be. Your method could be as simple as: func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { return CGFloat(25.0) } (or whatever width

JavaScript+Phonegap+Android: screen.width returns bad (almost random) values

青春壹個敷衍的年華 提交于 2019-12-04 12:57:51
After launching app with "deviceready" event, my Phonegap app on Android returns false screen.width (window.innerWidth is the same) values on ZTE Blade (native 800px). I get width values like 320, 533 or 787 px, sometimes different values within one app instance (launch) when asking multiple times... I have android:screenOrientation="landscape" in my AndroidManifest.xml. Using Phonegap/Cordova 1.8.1 in Eclipse (Indigo). Some sample values of screen.width: in index.html before document.addEventListener+"deviceready": 320 just after "deviceready": 320 then redirect three times (change window

What is the maximum iframe width of a facebook page? (July 2011)

瘦欲@ 提交于 2019-12-04 12:08:42
问题 What is the maximum iframe width of a facebook page? 回答1: It was 520px. As with a Canvas Page, the amount of space available to your app is bounded by the outer context of Facebook. Since your app is also loaded inside of Facebook Page, the space is smaller (520 pixels) than what is available to on a Canvas Page. from FB docs (yes i know that doc about canvas and it's only mentions iframes, but i cannot find quickly reference to full iframe documentation) Important Update On the March 30th

Centering and aligning width of figcaption tag on image in figure tag

风流意气都作罢 提交于 2019-12-04 11:20:42
问题 I've spent two days now attempting to resolve a fig/figcation issue to no avail. I have a Django application where users are able to submit images and I'm using the figure and figcaption tags to display the image with an accompanying caption. The main issue is that the caption width exceeds the picture width. I'm trying to figure out a way for the image to remain the same size and the caption to line up in width accordingly. I'm using Twitter-Bootstrap as well. I'm open to all solutions. Any

Pixel and percentage width divs side-by-side

与世无争的帅哥 提交于 2019-12-04 09:57:42
I've found a lot of similar questions, and tried out several solutions (including some of the so-called "holy grail" CSS layouts), but they don't quite do what I need. I have a containing div (a CSS containing block) with id right . Inside it on the left side, I want a fixed-width div (a splitter bar, but it doesn't matter what it's being used for; id splitpane ); on the right, filling the rest of the space, another div (id right-box below). I've tried making the two inner divs display: inline-block (with vertical-align: top ), setting the left one to width: 3px , but then there's no way to

wpf control width binding

一世执手 提交于 2019-12-04 09:55:44
问题 I have two borders with content, The second border width changes depending on the content, I'm trying to bind the first border to the second border width but it's not working and I'm not sure what i'm missing. Can someone give me some direction please? Below is a example of what I'm currently trying. <Border x:Name="border1" Width="{Binding Path=Width, ElementName=border2}"> ... </Border> <Border x:Name="border2"> ... </Border> 回答1: Change the path to ActualWidth . 回答2: change path to